mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Hide Permissions if user cannot view users
This commit is contained in:
@@ -688,12 +688,21 @@ export class DocumentDetailComponent
|
||||
}
|
||||
}
|
||||
|
||||
get showPermissions(): boolean {
|
||||
return (
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.User
|
||||
) && this.userIsOwner
|
||||
)
|
||||
}
|
||||
|
||||
get notesEnabled(): boolean {
|
||||
return (
|
||||
this.settings.get(SETTINGS_KEYS.NOTES_ENABLED) &&
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.Document
|
||||
PermissionType.Note
|
||||
)
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user