summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-02-28 13:08:07 -0800
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 11:49:52 -0800
commit846e581732e291f8927d04a5b1b40fe8f2688885 (patch)
tree50e0a538e26ac47f37ba68f93898185608c09096 /lib/banzai
parent130fd255bc0735d4175f2db2770a9092882fa3a4 (diff)
downloadgitlab-ce-846e581732e291f8927d04a5b1b40fe8f2688885.tar.gz
use a magic default :global symbol instead of nil
to make sure we mean the global permissions
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/reference_parser/base_parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/reference_parser/base_parser.rb b/lib/banzai/reference_parser/base_parser.rb
index 2058a58d0ae..b121c37c5d0 100644
--- a/lib/banzai/reference_parser/base_parser.rb
+++ b/lib/banzai/reference_parser/base_parser.rb
@@ -210,7 +210,7 @@ module Banzai
grouped_objects_for_nodes(nodes, Project, 'data-project')
end
- def can?(user, permission, subject)
+ def can?(user, permission, subject = :global)
Ability.allowed?(user, permission, subject)
end