diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-11 13:57:52 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:58:26 -0200 |
commit | bdf365e64f35e76ba6d9a372111ce502db11827e (patch) | |
tree | 20438baa7bbeba2838067e2a2b74ebd359ea1ce1 /app/policies | |
parent | f98e97fe78dce11a1f88c3961be402d179e63927 (diff) | |
download | gitlab-ce-bdf365e64f35e76ba6d9a372111ce502db11827e.tar.gz |
Use delegate! on group and project labels policies
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_label_policy.rb | 2 | ||||
-rw-r--r-- | app/policies/project_label_policy.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/policies/group_label_policy.rb b/app/policies/group_label_policy.rb index 4d4052c5800..7b34aa182eb 100644 --- a/app/policies/group_label_policy.rb +++ b/app/policies/group_label_policy.rb @@ -1,5 +1,5 @@ class GroupLabelPolicy < BasePolicy def rules - can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.group) + delegate! @subject.group end end diff --git a/app/policies/project_label_policy.rb b/app/policies/project_label_policy.rb index e7bd58372a6..b12b4c5166b 100644 --- a/app/policies/project_label_policy.rb +++ b/app/policies/project_label_policy.rb @@ -1,5 +1,5 @@ class ProjectLabelPolicy < BasePolicy def rules - can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.project) + delegate! @subject.project end end |