mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-24 07:18:11 +01:00
Refactor permissions API endpoints, UI group permissions
This commit is contained in:
parent
f2d635671d
commit
211fbf0cf6
29 changed files with 353 additions and 139 deletions
|
|
@ -22,7 +22,10 @@ export class PermissionsGuard implements CanActivate {
|
|||
state: RouterStateSnapshot
|
||||
): boolean | UrlTree {
|
||||
if (
|
||||
!this.permissionsService.currentUserCan(route.data.requiredPermission)
|
||||
!this.permissionsService.currentUserCan(
|
||||
route.data.requiredPermission.action,
|
||||
route.data.requiredPermission.type
|
||||
)
|
||||
) {
|
||||
this.toastService.showError(
|
||||
$localize`You don't have permissions to do that`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue