Note creation / deletion should respect doc permissions

- Disable add note button on frontend
- Explicitly disable add / delete via api
This commit is contained in:
shamoon committed 2023-08-01 22:28:27 -07:00
1 parent ca4500692f
commit 2e67697d36
5 files changed
+82 -8

No files matched your search

@@ -26,6 +26,9 @@ export class DocumentNotesComponent extends ComponentWithPermissions {
@Input()
notes: PaperlessDocumentNote[] = []
@Input()
addDisabled: boolean = false
@Output()
updated: EventEmitter<PaperlessDocumentNote[]> = new EventEmitter()
users: PaperlessUser[]
@@ -61,7 +64,9 @@ export class DocumentNotesComponent extends ComponentWithPermissions {
error: (e) => {
this.networkActive = false
this.toastService.showError(
$localize`Error saving note: ${e.toString()}`
$localize`Error saving note`,
10000,
JSON.stringify(e)
)
},
})