Refactor permissions API endpoints, UI group permissions

This commit is contained in:
Michael Shamoon
2022-12-07 21:11:47 -08:00
parent 4016649a18
commit 692f43f43e
29 changed files with 353 additions and 139 deletions

View File

@@ -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`