mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 10:16:16 +01:00
Fix deletion of permissions after modification
Permissions could not be deleted, when they were modified (eg. change of role or of verbs).
This commit is contained in:
@@ -451,7 +451,10 @@ function deletePermissionFromState(
|
||||
) {
|
||||
let newPermission = [];
|
||||
for (let i = 0; i < oldPermissions.length; i++) {
|
||||
if (oldPermissions[i] !== permission) {
|
||||
if (
|
||||
oldPermissions[i].name !== permission.name ||
|
||||
oldPermissions[i].groupPermission !== permission.groupPermission
|
||||
) {
|
||||
newPermission.push(oldPermissions[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user