summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:09:21 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:39:22 -0700
commit57def53c84091a56f3a2443d214fe80f2c026d00 (patch)
tree6acfe610ab3112c929e0781a2f9aaa16ea6ea878 /app/models/ability.rb
parentb3b7fb1fe7b876487b1464aa5779bacec7276742 (diff)
downloadgitlab-ce-57def53c84091a56f3a2443d214fe80f2c026d00.tar.gz
factor out a RuleSet so that `delegate!` retains @cannot
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 8ccbb9bee9c..fa8f8bc3a5f 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -55,7 +55,7 @@ class Ability
user_key = user ? user.id : 'anonymous'
subject_key = subject ? "#{subject.class.name}/#{subject.id}" : 'global'
key = "/ability/#{user_key}/#{subject_key}"
- RequestStore[key] ||= Set.new(uncached_allowed(user, subject)).freeze
+ RequestStore[key] ||= uncached_allowed(user, subject).freeze
end
private