mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 04:26:53 +00:00
Refactor permissions API endpoints, UI group permissions
This commit is contained in:
1 parent
f2d635671d
commit
211fbf0cf6
29 files changed
+353
-139
No files matched your search
@@ -81,10 +81,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.showNotification(SETTINGS_KEYS.NOTIFICATIONS_CONSUMER_SUCCESS)
|
||||
) {
|
||||
if (
|
||||
this.permissionsService.currentUserCan({
|
||||
action: PermissionAction.View,
|
||||
type: PermissionType.Document,
|
||||
})
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.Document
|
||||
)
|
||||
) {
|
||||
this.toastService.show({
|
||||
title: $localize`Document added`,
|
||||
@@ -246,10 +246,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
public get dragDropEnabled(): boolean {
|
||||
return (
|
||||
!this.router.url.includes('dashboard') &&
|
||||
this.permissionsService.currentUserCan({
|
||||
action: PermissionAction.Add,
|
||||
type: PermissionType.Document,
|
||||
})
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.Add,
|
||||
PermissionType.Document
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user