Use delegate! on group and project labels policies
This commit is contained in:
parent
f98e97fe78
commit
bdf365e64f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue