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>2016-08-18 20:38:25 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 21:39:22 +0300
commit5b7edc74b65f6855d3744ba600f3972c8cbb5894 (patch)
tree013f20bf29cd0e875530363ae5f184c8e23d6b6d /app/policies/base_policy.rb
parenta340829c42617b40696408c3097d6476970e8b87 (diff)
use the cached abilities in #delegate!
Diffstat (limited to 'app/policies/base_policy.rb')
-rw-r--r--app/policies/base_policy.rb2
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)