Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f004f6b2
Commit
f004f6b2
authored
Jun 05, 2020
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use existing project auth method
parent
e0d317ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
7 deletions
+1
-7
app/models/user.rb
app/models/user.rb
+0
-6
app/services/spam/spam_verdict_service.rb
app/services/spam/spam_verdict_service.rb
+1
-1
No files found.
app/models/user.rb
View file @
f004f6b2
...
...
@@ -1067,12 +1067,6 @@ class User < ApplicationRecord
user_highest_role
&
.
highest_access_level
||
Gitlab
::
Access
::
NO_ACCESS
end
def
authorized_for_project?
(
project
)
return
false
unless
project
project_authorizations
.
where
(
project_id:
project
.
id
).
exists?
end
def
accessible_deploy_keys
DeployKey
.
from_union
([
DeployKey
.
where
(
id:
project_deploy_keys
.
select
(
:deploy_key_id
)),
...
...
app/services/spam/spam_verdict_service.rb
View file @
f004f6b2
...
...
@@ -83,7 +83,7 @@ module Spam
email:
user
.
email
,
username:
user
.
username
},
user_in_project:
user
.
authorized_
for_
project?
(
project
)
user_in_project:
user
.
authorized_project?
(
project
)
})
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment