Management lists edit / delete button disabling by permissions

This commit is contained in:
Michael Shamoon
2022-12-07 17:49:02 -08:00
parent 932051d80d
commit 4016649a18
6 changed files with 48 additions and 10 deletions

View File

@@ -3,7 +3,10 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { FILTER_STORAGE_PATH } from 'src/app/data/filter-rule-type'
import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'
import { DocumentListViewService } from 'src/app/services/document-list-view.service'
import { PermissionType } from 'src/app/services/permissions.service'
import {
PermissionsService,
PermissionType,
} from 'src/app/services/permissions.service'
import { StoragePathService } from 'src/app/services/rest/storage-path.service'
import { ToastService } from 'src/app/services/toast.service'
import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component'
@@ -19,7 +22,8 @@ export class StoragePathListComponent extends ManagementListComponent<PaperlessS
directoryService: StoragePathService,
modalService: NgbModal,
toastService: ToastService,
documentListViewService: DocumentListViewService
documentListViewService: DocumentListViewService,
permissionsService: PermissionsService
) {
super(
directoryService,
@@ -27,6 +31,7 @@ export class StoragePathListComponent extends ManagementListComponent<PaperlessS
StoragePathEditDialogComponent,
toastService,
documentListViewService,
permissionsService,
FILTER_STORAGE_PATH,
$localize`storage path`,
$localize`storage paths`,