@@ -42,6 +42,7 @@ import { MenuResolver } from './menu.resolver';
4242import { ThemedPageErrorComponent } from './page-error/themed-page-error.component' ;
4343import { HomePageResolver } from './home-page/home-page.resolver' ;
4444import { ViewTrackerResolverService } from './statistics/angulartics/dspace/view-tracker-resolver.service' ;
45+ import { notAuthenticatedGuard } from './core/auth/not-authenticated.guard' ;
4546
4647@NgModule ( {
4748 imports : [
@@ -98,13 +99,13 @@ import { ViewTrackerResolverService } from './statistics/angulartics/dspace/view
9899 path : REGISTER_PATH ,
99100 loadChildren : ( ) => import ( './register-page/register-page.module' )
100101 . then ( ( m ) => m . RegisterPageModule ) ,
101- canActivate : [ SiteRegisterGuard ]
102+ canActivate : [ notAuthenticatedGuard , SiteRegisterGuard ]
102103 } ,
103104 {
104105 path : FORGOT_PASSWORD_PATH ,
105106 loadChildren : ( ) => import ( './forgot-password/forgot-password.module' )
106107 . then ( ( m ) => m . ForgotPasswordModule ) ,
107- canActivate : [ EndUserAgreementCurrentUserGuard ]
108+ canActivate : [ notAuthenticatedGuard , EndUserAgreementCurrentUserGuard ]
108109 } ,
109110 {
110111 path : COMMUNITY_MODULE_PATH ,
@@ -169,12 +170,14 @@ import { ViewTrackerResolverService } from './statistics/angulartics/dspace/view
169170 {
170171 path : 'login' ,
171172 loadChildren : ( ) => import ( './login-page/login-page.module' )
172- . then ( ( m ) => m . LoginPageModule )
173+ . then ( ( m ) => m . LoginPageModule ) ,
174+ canActivate : [ notAuthenticatedGuard ]
173175 } ,
174176 {
175177 path : 'logout' ,
176178 loadChildren : ( ) => import ( './logout-page/logout-page.module' )
177- . then ( ( m ) => m . LogoutPageModule )
179+ . then ( ( m ) => m . LogoutPageModule ) ,
180+ canActivate : [ AuthenticatedGuard ]
178181 } ,
179182 {
180183 path : 'submit' ,
0 commit comments