diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-08-18 10:38:25 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-08-30 11:39:22 -0700 |
commit | 5b7edc74b65f6855d3744ba600f3972c8cbb5894 (patch) | |
tree | 013f20bf29cd0e875530363ae5f184c8e23d6b6d /app/policies | |
parent | a340829c42617b40696408c3097d6476970e8b87 (diff) | |
download | gitlab-ce-5b7edc74b65f6855d3744ba600f3972c8cbb5894.tar.gz |
use the cached abilities in #delegate!
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/base_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb index 5a5b99c81c8..6d38e2eaa73 100644 --- a/app/policies/base_policy.rb +++ b/app/policies/base_policy.rb @@ -43,7 +43,7 @@ class BasePolicy end def delegate!(new_subject) - @can.merge(BasePolicy.class_for(new_subject).abilities(@user, new_subject)) + @can.merge(Ability.allowed(@user, new_subject)) end def can?(rule) |