From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:04:18 +0000 (-0800) Subject: Handle user saved and no longer has permissions X-Git-Tag: v1.14.0-beta.rc1~13^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cfc416cdcf3528f586f45d9d768bf3bfe8f9e1b;p=thirdparty%2Fpaperless-ngx.git Handle user saved and no longer has permissions --- 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 0fc6174343..bb22c49ab3 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()) + ) + } }, }) }