mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
fix inherited permissions not visually showing as checked
This commit is contained in:
parent
31850c3351
commit
f8b77d7ef7
3 changed files with 8 additions and 3 deletions
|
|
@ -46,9 +46,14 @@ export class PermissionsSelectComponent
|
|||
@Input()
|
||||
set inheritedPermissions(inherited: string[]) {
|
||||
// remove <app_label>. from permission strings
|
||||
this._inheritedPermissions = inherited?.length
|
||||
const newInheritedPermissions = inherited?.length
|
||||
? inherited.map((p) => p.replace(/^\w+\./g, ''))
|
||||
: []
|
||||
|
||||
if (this._inheritedPermissions !== newInheritedPermissions) {
|
||||
this._inheritedPermissions = newInheritedPermissions
|
||||
this.writeValue(this.permissions) // updates visual checks etc.
|
||||
}
|
||||
}
|
||||
|
||||
inheritedWarning: string = $localize`Inerhited from group`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue