Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-03-01 00:08:07 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 22:49:52 +0300
commit846e581732e291f8927d04a5b1b40fe8f2688885 (patch)
tree50e0a538e26ac47f37ba68f93898185608c09096 /lib/gitlab/allowable.rb
parent130fd255bc0735d4175f2db2770a9092882fa3a4 (diff)
use a magic default :global symbol instead of nil
to make sure we mean the global permissions
Diffstat (limited to 'lib/gitlab/allowable.rb')
-rw-r--r--lib/gitlab/allowable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/allowable.rb b/lib/gitlab/allowable.rb
index f48abcc86d5..e4f7cad2b79 100644
--- a/lib/gitlab/allowable.rb
+++ b/lib/gitlab/allowable.rb
@@ -1,6 +1,6 @@
module Gitlab
module Allowable
- def can?(user, action, subject)
+ def can?(user, action, subject = :global)
Ability.allowed?(user, action, subject)
end
end