Add support for editing labelling of one's own role (#18812)
Still disallow edition of rank or permissions
This commit is contained in:
parent
05e39dc619
commit
ecb3bb3256
4 changed files with 23 additions and 11 deletions
|
@ -10,7 +10,7 @@ class UserRolePolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def update?
|
||||
role.can?(:manage_roles) && role.overrides?(record)
|
||||
role.can?(:manage_roles) && (role.overrides?(record) || role.id == record.id)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue