Skip to content

Commit 49e0030

Browse files
[DURACOM-390] set guard on other routes that make no sense for logged users
1 parent 67a0395 commit 49e0030

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/app-routes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const APP_ROUTES: Route[] = [
104104
path: FORGOT_PASSWORD_PATH,
105105
loadChildren: () => import('./forgot-password/forgot-password-routes')
106106
.then((m) => m.ROUTES),
107-
canActivate: [endUserAgreementCurrentUserGuard, forgotPasswordCheckGuard],
107+
canActivate: [notAuthenticatedGuard, endUserAgreementCurrentUserGuard, forgotPasswordCheckGuard],
108108
},
109109
{
110110
path: COMMUNITY_MODULE_PATH,
@@ -181,11 +181,13 @@ export const APP_ROUTES: Route[] = [
181181
path: 'login',
182182
loadChildren: () => import('./login-page/login-page-routes')
183183
.then((m) => m.ROUTES),
184+
canActivate: [notAuthenticatedGuard]
184185
},
185186
{
186187
path: 'logout',
187188
loadChildren: () => import('./logout-page/logout-page-routes')
188189
.then((m) => m.ROUTES),
190+
canActivate: [authenticatedGuard]
189191
},
190192
{
191193
path: 'submit',
@@ -273,6 +275,7 @@ export const APP_ROUTES: Route[] = [
273275
{
274276
path: 'external-login/:token',
275277
loadChildren: () => import('./external-login-page/external-login-routes').then((m) => m.ROUTES),
278+
canActivate: [notAuthenticatedGuard]
276279
},
277280
{
278281
path: 'review-account/:token',
@@ -283,6 +286,7 @@ export const APP_ROUTES: Route[] = [
283286
path: 'email-confirmation',
284287
loadChildren: () => import('./external-login-email-confirmation-page/external-login-email-confirmation-page-routes')
285288
.then((m) => m.ROUTES),
289+
canActivate: [notAuthenticatedGuard]
286290
},
287291
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent },
288292
],

0 commit comments

Comments
 (0)