Hide Permissions if user cannot view users

This commit is contained in:
shamoon
2023-04-09 16:17:48 -07:00
parent 606737f3b2
commit e75510309d
2 changed files with 11 additions and 2 deletions

View File

@@ -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
)
)
}