Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Handle user saved and no longer has permissions

shamoon4cfc416cdcf3
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 0fc617434..bb22c49ab 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
@@ -474,12 +474,17 @@ export class DocumentDetailComponent
},
error: (error) => {
this.networkActive = false
- this.error = error.error
- this.toastService.showError(
- $localize`Error saving document` +
- ': ' +
- (error.message ?? error.toString())
- )
+ if (!this.userCanEdit) {
+ this.toastService.showInfo($localize`Document saved successfully.`)
+ this.close()
+ } else {
+ this.error = error.error
+ this.toastService.showError(
+ $localize`Error saving document` +
+ ': ' +
+ (error.message ?? error.toString())
+ )
+ }
},
})
}