From 1ba61030aa3ae9d2972b19e8985f147cc1b306d6 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Fri, 21 Mar 2025 09:43:45 -0700
Subject: [PATCH] Actually, just do it this way
---
src-ui/messages.xlf | 68 +++++++++----------
.../document-detail.component.ts | 15 +++-
2 files changed, 47 insertions(+), 36 deletions(-)
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 1977c4203..040419c57 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -2537,19 +2537,19 @@
src/app/components/document-detail/document-detail.component.ts
- 958
+ 968src/app/components/document-detail/document-detail.component.ts
- 1318
+ 1328src/app/components/document-detail/document-detail.component.ts
- 1357
+ 1367src/app/components/document-detail/document-detail.component.ts
- 1398
+ 1408src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -3157,7 +3157,7 @@
src/app/components/document-detail/document-detail.component.ts
- 911
+ 921src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -3406,7 +3406,7 @@
src/app/components/document-detail/document-detail.component.ts
- 1375
+ 1385src/app/guards/dirty-saved-view.guard.ts
@@ -6908,35 +6908,35 @@
src/app/components/document-detail/document-detail.component.ts
- 829
+ 839Error saving document ""src/app/components/document-detail/document-detail.component.ts
- 835
+ 845Error saving documentsrc/app/components/document-detail/document-detail.component.ts
- 880
+ 890Do you really want to move the document "" to the trash?src/app/components/document-detail/document-detail.component.ts
- 912
+ 922Documents can be restored prior to permanent deletion.src/app/components/document-detail/document-detail.component.ts
- 913
+ 923src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6947,7 +6947,7 @@
Move to trashsrc/app/components/document-detail/document-detail.component.ts
- 915
+ 925src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6958,14 +6958,14 @@
Error deleting documentsrc/app/components/document-detail/document-detail.component.ts
- 934
+ 944Reprocess confirmsrc/app/components/document-detail/document-detail.component.ts
- 954
+ 964src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -6976,77 +6976,77 @@
This operation will permanently recreate the archive file for this document.src/app/components/document-detail/document-detail.component.ts
- 955
+ 965The archive file will be re-generated with the current settings.src/app/components/document-detail/document-detail.component.ts
- 956
+ 966Reprocess operation for "" will begin in the background. Close and re-open or reload this document after the operation has completed to see new content.src/app/components/document-detail/document-detail.component.ts
- 966
+ 976Error executing operationsrc/app/components/document-detail/document-detail.component.ts
- 977
+ 987Error downloading documentsrc/app/components/document-detail/document-detail.component.ts
- 1024
+ 1034Page Fitsrc/app/components/document-detail/document-detail.component.ts
- 1103
+ 1113Split confirmsrc/app/components/document-detail/document-detail.component.ts
- 1316
+ 1326This operation will split the selected document(s) into new documents.src/app/components/document-detail/document-detail.component.ts
- 1317
+ 1327Split operation for "" will begin in the background.src/app/components/document-detail/document-detail.component.ts
- 1333
+ 1343Error executing split operationsrc/app/components/document-detail/document-detail.component.ts
- 1342
+ 1352Rotate confirmsrc/app/components/document-detail/document-detail.component.ts
- 1355
+ 1365src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -7057,60 +7057,60 @@
This operation will permanently rotate the original version of the current document.src/app/components/document-detail/document-detail.component.ts
- 1356
+ 1366Rotation of "" will begin in the background. Close and re-open the document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1372
+ 1382Error executing rotate operationsrc/app/components/document-detail/document-detail.component.ts
- 1384
+ 1394Delete pages confirmsrc/app/components/document-detail/document-detail.component.ts
- 1396
+ 1406This operation will permanently delete the selected pages from the original document.src/app/components/document-detail/document-detail.component.ts
- 1397
+ 1407Delete pages operation for "" will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1412
+ 1422Error executing delete pages operationsrc/app/components/document-detail/document-detail.component.ts
- 1421
+ 1431An error occurred loading tiff: src/app/components/document-detail/document-detail.component.ts
- 1481
+ 1491src/app/components/document-detail/document-detail.component.ts
- 1485
+ 1495
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index 27a74cfcd..ba3b76bc3 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -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(