Use delegate! on group and project labels policies

This commit is contained in:
Douglas Barbosa Alexandre 2016-10-11 13:57:52 -03:00
parent f98e97fe78
commit bdf365e64f
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
class GroupLabelPolicy < BasePolicy class GroupLabelPolicy < BasePolicy
def rules def rules
can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.group) delegate! @subject.group
end end
end end

View File

@ -1,5 +1,5 @@
class ProjectLabelPolicy < BasePolicy class ProjectLabelPolicy < BasePolicy
def rules def rules
can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.project) delegate! @subject.project
end end
end end