mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Fix: frontend better reflect global perms for bulk edit, disabled form state (#8469)
This commit is contained in:
@@ -577,6 +577,10 @@ export class DocumentDetailComponent
|
||||
this.permissionsService.currentUserHasObjectPermissions(
|
||||
PermissionAction.Change,
|
||||
doc
|
||||
) &&
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.Change,
|
||||
PermissionType.Document
|
||||
)
|
||||
) {
|
||||
this.documentsService
|
||||
@@ -1066,6 +1070,13 @@ export class DocumentDetailComponent
|
||||
)
|
||||
}
|
||||
|
||||
get userCanAdd(): boolean {
|
||||
return this.permissionsService.currentUserCan(
|
||||
PermissionAction.Add,
|
||||
PermissionType.Document
|
||||
)
|
||||
}
|
||||
|
||||
filterDocuments(items: ObjectWithId[] | NgbDateStruct[], type?: DataType) {
|
||||
const filterRules: FilterRule[] = items.flatMap((i) => {
|
||||
if (i.hasOwnProperty('year')) {
|
||||
|
Reference in New Issue
Block a user