diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-08-30 11:09:21 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-08-30 11:39:22 -0700 |
commit | 57def53c84091a56f3a2443d214fe80f2c026d00 (patch) | |
tree | 6acfe610ab3112c929e0781a2f9aaa16ea6ea878 /app/models/ability.rb | |
parent | b3b7fb1fe7b876487b1464aa5779bacec7276742 (diff) | |
download | gitlab-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.rb | 2 |
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 |