mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Change toggle all, fix multiple group inheritance, fix select dark mode display
This commit is contained in:
@@ -66,9 +66,12 @@ export class UserEditDialogComponent
|
||||
}
|
||||
|
||||
get inheritedPermissions(): string[] {
|
||||
const groupsVal = this.objectForm.get('groups').value
|
||||
return groupsVal !== null
|
||||
? this.groups.find((g) => g.id == groupsVal)?.permissions
|
||||
: []
|
||||
const groupsVal: Array<number> = this.objectForm.get('groups').value
|
||||
|
||||
if (!groupsVal) return []
|
||||
else
|
||||
return groupsVal.flatMap(
|
||||
(id) => this.groups.find((g) => g.id == id)?.permissions
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -145,6 +145,9 @@ export class PermissionsSelectComponent
|
||||
})
|
||||
this.typesWithAllActions.add(type)
|
||||
} else {
|
||||
Object.keys(PermissionAction).forEach((action) => {
|
||||
typeGroup.get(action).patchValue(false)
|
||||
})
|
||||
this.typesWithAllActions.delete(type)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user