Use unless over if for negative condition on the GroupMemberPolicy

parent feff94d4
......@@ -21,7 +21,7 @@ class GroupMemberPolicy < BasePolicy
if can_override
can! :override_group_member if @subject.ldap?
can! :update_group_member if !@subject.ldap? || (@subject.ldap? && @subject.override?)
can! :update_group_member unless @subject.ldap? && !@subject.override?
end
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