mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Refactor permissions API endpoints, UI group permissions
This commit is contained in:
@@ -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]
|
||||
)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user