Commit ca7c7b91 authored by Alex Kalderimis's avatar Alex Kalderimis

Remove unnecessary comments

parent 8065dc9c
...@@ -51,14 +51,11 @@ module Gitlab ...@@ -51,14 +51,11 @@ module Gitlab
object object
end end
# authorizes the object using the current class authorization.
def authorize!(object) def authorize!(object)
raise_resource_not_available_error! unless authorized_resource?(object) raise_resource_not_available_error! unless authorized_resource?(object)
end end
def authorized_resource?(object) 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? raise ConfigurationError, "#{self.class.name} has no authorizations" if self.class.authorization.none?
self.class.authorization.ok?(object, current_user) self.class.authorization.ok?(object, current_user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment