@@ -25,6 +25,7 @@ import { COLLECTION_MODULE_PATH } from './collection-page/collection-page-routin
2525import { COMMUNITY_MODULE_PATH } from './community-page/community-page-routing-paths' ;
2626import { authBlockingGuard } from './core/auth/auth-blocking.guard' ;
2727import { authenticatedGuard } from './core/auth/authenticated.guard' ;
28+ import { notAuthenticatedGuard } from './core/auth/not-authenticated.guard' ;
2829import { groupAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard' ;
2930import { siteAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/site-administrator.guard' ;
3031import { siteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard' ;
@@ -97,13 +98,13 @@ export const APP_ROUTES: Route[] = [
9798 path : REGISTER_PATH ,
9899 loadChildren : ( ) => import ( './register-page/register-page-routes' )
99100 . then ( ( m ) => m . ROUTES ) ,
100- canActivate : [ siteRegisterGuard ] ,
101+ canActivate : [ notAuthenticatedGuard , siteRegisterGuard ] ,
101102 } ,
102103 {
103104 path : FORGOT_PASSWORD_PATH ,
104105 loadChildren : ( ) => import ( './forgot-password/forgot-password-routes' )
105106 . then ( ( m ) => m . ROUTES ) ,
106- canActivate : [ endUserAgreementCurrentUserGuard , forgotPasswordCheckGuard ] ,
107+ canActivate : [ notAuthenticatedGuard , endUserAgreementCurrentUserGuard , forgotPasswordCheckGuard ] ,
107108 } ,
108109 {
109110 path : COMMUNITY_MODULE_PATH ,
@@ -180,11 +181,13 @@ export const APP_ROUTES: Route[] = [
180181 path : 'login' ,
181182 loadChildren : ( ) => import ( './login-page/login-page-routes' )
182183 . then ( ( m ) => m . ROUTES ) ,
184+ canActivate : [ notAuthenticatedGuard ] ,
183185 } ,
184186 {
185187 path : 'logout' ,
186188 loadChildren : ( ) => import ( './logout-page/logout-page-routes' )
187189 . then ( ( m ) => m . ROUTES ) ,
190+ canActivate : [ authenticatedGuard ] ,
188191 } ,
189192 {
190193 path : 'submit' ,
@@ -272,6 +275,7 @@ export const APP_ROUTES: Route[] = [
272275 {
273276 path : 'external-login/:token' ,
274277 loadChildren : ( ) => import ( './external-login-page/external-login-routes' ) . then ( ( m ) => m . ROUTES ) ,
278+ canActivate : [ notAuthenticatedGuard ] ,
275279 } ,
276280 {
277281 path : 'review-account/:token' ,
@@ -282,6 +286,7 @@ export const APP_ROUTES: Route[] = [
282286 path : 'email-confirmation' ,
283287 loadChildren : ( ) => import ( './external-login-email-confirmation-page/external-login-email-confirmation-page-routes' )
284288 . then ( ( m ) => m . ROUTES ) ,
289+ canActivate : [ notAuthenticatedGuard ] ,
285290 } ,
286291 { path : '**' , pathMatch : 'full' , component : ThemedPageNotFoundComponent } ,
287292 ] ,
0 commit comments