mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
feat: reflect django permissions on UI
This commit is contained in:
@@ -553,6 +553,11 @@ export class DocumentDetailComponent
|
||||
}
|
||||
|
||||
get commentsEnabled(): boolean {
|
||||
return this.settings.get(SETTINGS_KEYS.COMMENTS_ENABLED)
|
||||
// TODO - Is this the only way to allow/disallow from permissions?
|
||||
var canViewComments = false
|
||||
this.settings.permissions().subscribe((perm) => {
|
||||
canViewComments = perm.includes('documents.view_comment')
|
||||
})
|
||||
return this.settings.get(SETTINGS_KEYS.COMMENTS_ENABLED) && canViewComments
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user