mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-11 10:00:48 -05:00
Handle user saved and no longer has permissions
This commit is contained in:
parent
9902c4745d
commit
4cfc416cdc
@ -474,12 +474,17 @@ export class DocumentDetailComponent
|
|||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
this.networkActive = false
|
this.networkActive = false
|
||||||
|
if (!this.userCanEdit) {
|
||||||
|
this.toastService.showInfo($localize`Document saved successfully.`)
|
||||||
|
this.close()
|
||||||
|
} else {
|
||||||
this.error = error.error
|
this.error = error.error
|
||||||
this.toastService.showError(
|
this.toastService.showError(
|
||||||
$localize`Error saving document` +
|
$localize`Error saving document` +
|
||||||
': ' +
|
': ' +
|
||||||
(error.message ?? error.toString())
|
(error.message ?? error.toString())
|
||||||
)
|
)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user