mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Merge pull request #2813 from paperless-ngx/fix-2811
Fix: Disable suggestions for read-only docs
This commit is contained in:
commit
f0fa726e71
@ -306,6 +306,12 @@ export class DocumentDetailComponent
|
||||
)
|
||||
},
|
||||
})
|
||||
if (
|
||||
this.permissionsService.currentUserHasObjectPermissions(
|
||||
PermissionAction.Change,
|
||||
doc
|
||||
)
|
||||
) {
|
||||
this.documentsService
|
||||
.getSuggestions(doc.id)
|
||||
.pipe(first())
|
||||
@ -320,6 +326,7 @@ export class DocumentDetailComponent
|
||||
)
|
||||
},
|
||||
})
|
||||
}
|
||||
this.title = this.documentTitlePipe.transform(doc.title)
|
||||
const docFormValues = Object.assign({}, doc)
|
||||
docFormValues['permissions_form'] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user