Use delegate! on group and project labels policies

parent f98e97fe
class GroupLabelPolicy < BasePolicy
def rules
can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.group)
delegate! @subject.group
end
end
class ProjectLabelPolicy < BasePolicy
def rules
can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.project)
delegate! @subject.project
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment