Handle user saved and no longer has permissions

This commit is contained in:
shamoon 2023-03-06 10:04:18 -08:00
parent 9902c4745d
commit 4cfc416cdc

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