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