mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 07:45:32 +01:00
Refactor permissions API endpoints, UI group permissions
This commit is contained in:
parent
f2d635671d
commit
211fbf0cf6
29 changed files with 353 additions and 139 deletions
|
|
@ -156,18 +156,18 @@ export class PermissionsSelectComponent
|
|||
if (this._inheritedPermissions.length == 0) return false
|
||||
else if (actionKey) {
|
||||
return this._inheritedPermissions.includes(
|
||||
this.permissionsService.getPermissionCode({
|
||||
action: PermissionAction[actionKey],
|
||||
type: PermissionType[typeKey],
|
||||
})
|
||||
this.permissionsService.getPermissionCode(
|
||||
PermissionAction[actionKey],
|
||||
PermissionType[typeKey]
|
||||
)
|
||||
)
|
||||
} else {
|
||||
return Object.values(PermissionAction).every((action) => {
|
||||
return this._inheritedPermissions.includes(
|
||||
this.permissionsService.getPermissionCode({
|
||||
action: action as PermissionAction,
|
||||
type: PermissionType[typeKey],
|
||||
})
|
||||
this.permissionsService.getPermissionCode(
|
||||
action as PermissionAction,
|
||||
PermissionType[typeKey]
|
||||
)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue