mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fix inherited permissions being set at user level & unable to unselect existing perms
This commit is contained in:
@@ -69,6 +69,10 @@ export class PermissionsSelectComponent
|
||||
}
|
||||
|
||||
writeValue(permissions: string[]): void {
|
||||
if (this.permissions === permissions) {
|
||||
return
|
||||
}
|
||||
|
||||
this.permissions = permissions ?? []
|
||||
const allPerms = this._inheritedPermissions.concat(this.permissions)
|
||||
|
||||
@@ -138,7 +142,10 @@ export class PermissionsSelectComponent
|
||||
this.typesWithAllActions.delete(typeKey)
|
||||
}
|
||||
})
|
||||
this.onChange(permissions)
|
||||
|
||||
this.onChange(
|
||||
permissions.filter((p) => !this._inheritedPermissions.includes(p))
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user