mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
Merge branch 'dev' into beta
This commit is contained in:
commit
f753f6dc46
46 changed files with 1472 additions and 1461 deletions
|
|
@ -824,11 +824,22 @@ export class DocumentDetailComponent
|
|||
},
|
||||
error: (error) => {
|
||||
this.networkActive = false
|
||||
if (!this.userCanEdit) {
|
||||
const canEdit =
|
||||
this.permissionsService.currentUserCan(
|
||||
PermissionAction.Change,
|
||||
PermissionType.Document
|
||||
) &&
|
||||
this.permissionsService.currentUserHasObjectPermissions(
|
||||
PermissionAction.Change,
|
||||
this.document
|
||||
)
|
||||
if (!canEdit) {
|
||||
// document was 'given away'
|
||||
this.openDocumentService.setDirty(this.document, false)
|
||||
this.toastService.showInfo(
|
||||
$localize`Document "${this.document.title}" saved successfully.`
|
||||
)
|
||||
close && this.close()
|
||||
this.close()
|
||||
} else {
|
||||
this.error = error.error
|
||||
this.toastService.showError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue