summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-08-18 16:12:32 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:39:22 -0700
commit2bdcef4d672121a387fca6da720d333dda8f7af6 (patch)
tree21668ef75c4bf9bd73dca89d740b189d5ace1bf0 /lib/api/helpers.rb
parent2b26270ab7c489ebde4aac835f8e7307dc7a7441 (diff)
downloadgitlab-ce-2bdcef4d672121a387fca6da720d333dda8f7af6.tar.gz
use a nil subject when we want to check global abilities
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index fdb70af694d..6a20ba95a79 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -129,7 +129,7 @@ module API
forbidden! unless current_user.is_admin?
end
- def authorize!(action, subject)
+ def authorize!(action, subject = nil)
forbidden! unless can?(current_user, action, subject)
end