Merge branch 'DM-540' into 'master'
DM-540: Check for roles before main guard Closes DM-540 See merge request redactmanager/red-ui!171
This commit is contained in:
commit
51e77d6344
@ -15,7 +15,7 @@ import { ifNotLoggedIn } from '@guards/if-not-logged-in.guard';
|
||||
import { TrashGuard } from '@guards/trash.guard';
|
||||
import { CompositeRouteGuard, DEFAULT_REDIRECT_KEY, IqserPermissionsGuard, IqserRoutes, orderedAsyncGuards } from '@iqser/common-ui';
|
||||
import { TenantSelectComponent } from '@iqser/common-ui/lib/tenants';
|
||||
import { hasAnyRoleGuard, IqserAuthGuard } from '@iqser/common-ui/lib/users';
|
||||
import { doesNotHaveAnyRole, hasAnyRole, IqserAuthGuard } from '@iqser/common-ui/lib/users';
|
||||
import { CustomRouteReuseStrategy } from '@iqser/common-ui/lib/utils';
|
||||
import { ARCHIVE_ROUTE, BreadcrumbTypes, DOSSIER_ID, DOSSIER_TEMPLATE_ID, DOSSIERS_ARCHIVE, DOSSIERS_ROUTE, FILE_ID } from '@red/domain';
|
||||
import { RedRoleGuard } from '@users/red-role.guard';
|
||||
@ -211,14 +211,14 @@ const routes: IqserRoutes = [
|
||||
},
|
||||
{
|
||||
path: ':tenant/main',
|
||||
canActivate: [orderedAsyncGuards([ifLoggedIn(), mainGuard()])],
|
||||
canActivate: [orderedAsyncGuards([ifLoggedIn(), hasAnyRole(), mainGuard()])],
|
||||
component: BaseScreenComponent,
|
||||
children: mainRoutes,
|
||||
},
|
||||
{
|
||||
path: ':tenant/auth-error',
|
||||
component: AuthErrorComponent,
|
||||
canActivate: [hasAnyRoleGuard()],
|
||||
canActivate: [doesNotHaveAnyRole()],
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 85fba4a1dd57ecbb133d938552d75fceffa1099c
|
||||
Subproject commit a6f8a3576522614b2d5bcc95b8a59ec0315e3a57
|
||||
Loading…
x
Reference in New Issue
Block a user