mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
Merge pull request #2813 from paperless-ngx/fix-2811
Fix: Disable suggestions for read-only docs
This commit is contained in:
commit
f0fa726e71
1 changed files with 21 additions and 14 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue