mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Fix: document link field consistent behavior with insufficient permissions (#7953)
This commit is contained in:
@@ -344,8 +344,8 @@
|
||||
@if (!hasNext()) {
|
||||
<button type="button" class="order-2 btn btn-sm btn-outline-primary" (click)="save(true)" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save & close</button>
|
||||
}
|
||||
<button type="button" class="order-0 btn btn-sm btn-outline-secondary" (click)="discard()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Discard</button>
|
||||
</ng-container>
|
||||
<button type="button" class="order-0 btn btn-sm btn-outline-secondary" (click)="discard()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Discard</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
|
@@ -1020,10 +1020,14 @@ export class DocumentDetailComponent
|
||||
}
|
||||
return (
|
||||
!this.document ||
|
||||
this.permissionsService.currentUserHasObjectPermissions(
|
||||
(this.permissionsService.currentUserCan(
|
||||
PermissionAction.Change,
|
||||
doc
|
||||
)
|
||||
PermissionType.Document
|
||||
) &&
|
||||
this.permissionsService.currentUserHasObjectPermissions(
|
||||
PermissionAction.Change,
|
||||
doc
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user