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
ca7c7b91
Commit
ca7c7b91
authored
Jun 14, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary comments
parent
8065dc9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
lib/gitlab/graphql/authorize/authorize_resource.rb
lib/gitlab/graphql/authorize/authorize_resource.rb
+0
-3
No files found.
lib/gitlab/graphql/authorize/authorize_resource.rb
View file @
ca7c7b91
...
...
@@ -51,14 +51,11 @@ module Gitlab
object
end
# authorizes the object using the current class authorization.
def
authorize!
(
object
)
raise_resource_not_available_error!
unless
authorized_resource?
(
object
)
end
def
authorized_resource?
(
object
)
# Sanity check. We don't want to accidentally allow a developer to authorize
# without first adding permissions to authorize against
raise
ConfigurationError
,
"
#{
self
.
class
.
name
}
has no authorizations"
if
self
.
class
.
authorization
.
none?
self
.
class
.
authorization
.
ok?
(
object
,
current_user
)
...
...
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