mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 01:57:08 +01:00
Fix startup without saved view permissions
This commit is contained in:
parent
75c5ccccec
commit
588a786d73
3 changed files with 23 additions and 4 deletions
|
|
@ -1,4 +1,9 @@
|
|||
import { Component } from '@angular/core'
|
||||
import {
|
||||
PermissionAction,
|
||||
PermissionsService,
|
||||
PermissionType,
|
||||
} from 'src/app/services/permissions.service'
|
||||
import { SavedViewService } from 'src/app/services/rest/saved-view.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
|
|
@ -10,10 +15,20 @@ import { ComponentWithPermissions } from '../with-permissions/with-permissions.c
|
|||
})
|
||||
export class DashboardComponent extends ComponentWithPermissions {
|
||||
constructor(
|
||||
public savedViewService: SavedViewService,
|
||||
public settingsService: SettingsService
|
||||
public settingsService: SettingsService,
|
||||
private permissionsService: PermissionsService,
|
||||
public savedViewService: SavedViewService
|
||||
) {
|
||||
super()
|
||||
|
||||
if (
|
||||
permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.SavedView
|
||||
)
|
||||
) {
|
||||
savedViewService.initialize()
|
||||
}
|
||||
}
|
||||
|
||||
get subtitle() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue