11import {
22 InMemoryScrollingOptions ,
3- mapToCanActivate ,
43 Route ,
54 RouterConfigOptions ,
65} from '@angular/router' ;
@@ -29,7 +28,7 @@ import { authenticatedGuard } from './core/auth/authenticated.guard';
2928import { groupAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard' ;
3029import { siteAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/site-administrator.guard' ;
3130import { siteRegisterGuard } from './core/data/feature-authorization/feature-authorization-guard/site-register.guard' ;
32- import { EndUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-user-agreement-current-user.guard' ;
31+ import { endUserAgreementCurrentUserGuard } from './core/end-user-agreement/end-user-agreement-current-user.guard' ;
3332import { reloadGuard } from './core/reload/reload.guard' ;
3433import { forgotPasswordCheckGuard } from './core/rest-property/forgot-password-check-guard.guard' ;
3534import { ServerCheckGuard } from './core/server-check/server-check.guard' ;
@@ -66,25 +65,25 @@ export const APP_ROUTES: Route[] = [
6665 . then ( ( m ) => m . ROUTES ) ,
6766 data : { showBreadcrumbs : false } ,
6867 providers : [ provideSuggestionNotificationsState ( ) ] ,
69- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
68+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
7069 } ,
7170 {
7271 path : 'community-list' ,
7372 loadChildren : ( ) => import ( './community-list-page/community-list-page-routes' )
7473 . then ( ( m ) => m . ROUTES ) ,
75- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
74+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
7675 } ,
7776 {
7877 path : 'id' ,
7978 loadChildren : ( ) => import ( './lookup-by-id/lookup-by-id-routes' )
8079 . then ( ( m ) => m . ROUTES ) ,
81- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
80+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
8281 } ,
8382 {
8483 path : 'handle' ,
8584 loadChildren : ( ) => import ( './lookup-by-id/lookup-by-id-routes' )
8685 . then ( ( m ) => m . ROUTES ) ,
87- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
86+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
8887 } ,
8988 {
9089 path : REGISTER_PATH ,
@@ -96,75 +95,75 @@ export const APP_ROUTES: Route[] = [
9695 path : FORGOT_PASSWORD_PATH ,
9796 loadChildren : ( ) => import ( './forgot-password/forgot-password-routes' )
9897 . then ( ( m ) => m . ROUTES ) ,
99- canActivate : [ EndUserAgreementCurrentUserGuard , forgotPasswordCheckGuard ] ,
98+ canActivate : [ endUserAgreementCurrentUserGuard , forgotPasswordCheckGuard ] ,
10099 } ,
101100 {
102101 path : COMMUNITY_MODULE_PATH ,
103102 loadChildren : ( ) => import ( './community-page/community-page-routes' )
104103 . then ( ( m ) => m . ROUTES ) ,
105- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
104+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
106105 } ,
107106 {
108107 path : COLLECTION_MODULE_PATH ,
109108 loadChildren : ( ) => import ( './collection-page/collection-page-routes' )
110109 . then ( ( m ) => m . ROUTES ) ,
111- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
110+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
112111 } ,
113112 {
114113 path : ITEM_MODULE_PATH ,
115114 loadChildren : ( ) => import ( './item-page/item-page-routes' )
116115 . then ( ( m ) => m . ROUTES ) ,
117- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
116+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
118117 } ,
119118 {
120119 path : 'entities/:entity-type' ,
121120 loadChildren : ( ) => import ( './item-page/item-page-routes' )
122121 . then ( ( m ) => m . ROUTES ) ,
123- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
122+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
124123 } ,
125124 {
126125 path : LEGACY_BITSTREAM_MODULE_PATH ,
127126 loadChildren : ( ) => import ( './bitstream-page/bitstream-page-routes' )
128127 . then ( ( m ) => m . ROUTES ) ,
129- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
128+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
130129 } ,
131130 {
132131 path : BITSTREAM_MODULE_PATH ,
133132 loadChildren : ( ) => import ( './bitstream-page/bitstream-page-routes' )
134133 . then ( ( m ) => m . ROUTES ) ,
135- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
134+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
136135 } ,
137136 {
138137 path : 'mydspace' ,
139138 loadChildren : ( ) => import ( './my-dspace-page/my-dspace-page-routes' )
140139 . then ( ( m ) => m . ROUTES ) ,
141140 providers : [ provideSuggestionNotificationsState ( ) ] ,
142- canActivate : [ authenticatedGuard , ... mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ] ,
141+ canActivate : [ authenticatedGuard , endUserAgreementCurrentUserGuard ] ,
143142 } ,
144143 {
145144 path : 'search' ,
146145 loadChildren : ( ) => import ( './search-page/search-page-routes' )
147146 . then ( ( m ) => m . ROUTES ) ,
148- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
147+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
149148 } ,
150149 {
151150 path : 'browse' ,
152151 loadChildren : ( ) => import ( './browse-by/browse-by-page-routes' )
153152 . then ( ( m ) => m . ROUTES ) ,
154- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
153+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
155154 } ,
156155 {
157156 path : ADMIN_MODULE_PATH ,
158157 loadChildren : ( ) => import ( './admin/admin-routes' )
159158 . then ( ( m ) => m . ROUTES ) ,
160- canActivate : [ siteAdministratorGuard , EndUserAgreementCurrentUserGuard ] ,
159+ canActivate : [ siteAdministratorGuard , endUserAgreementCurrentUserGuard ] ,
161160 } ,
162161 {
163162 path : NOTIFICATIONS_MODULE_PATH ,
164163 loadChildren : ( ) => import ( './quality-assurance-notifications-pages/notifications-pages-routes' )
165164 . then ( ( m ) => m . ROUTES ) ,
166165 providers : [ provideSuggestionNotificationsState ( ) ] ,
167- canActivate : [ authenticatedGuard , ... mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ] ,
166+ canActivate : [ authenticatedGuard , endUserAgreementCurrentUserGuard ] ,
168167 } ,
169168 {
170169 path : 'login' ,
@@ -181,47 +180,47 @@ export const APP_ROUTES: Route[] = [
181180 loadChildren : ( ) => import ( './submit-page/submit-page-routes' )
182181 . then ( ( m ) => m . ROUTES ) ,
183182 providers : [ provideSubmissionState ( ) ] ,
184- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
183+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
185184 } ,
186185 {
187186 path : 'import-external' ,
188187 loadChildren : ( ) => import ( './import-external-page/import-external-page-routes' )
189188 . then ( ( m ) => m . ROUTES ) ,
190- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
189+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
191190 } ,
192191 {
193192 path : 'workspaceitems' ,
194193 loadChildren : ( ) => import ( './workspaceitems-edit-page/workspaceitems-edit-page-routes' )
195194 . then ( ( m ) => m . ROUTES ) ,
196195 providers : [ provideSubmissionState ( ) ] ,
197- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
196+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
198197 } ,
199198 {
200199 path : WORKFLOW_ITEM_MODULE_PATH ,
201200 providers : [ provideSubmissionState ( ) ] ,
202201 loadChildren : ( ) => import ( './workflowitems-edit-page/workflowitems-edit-page-routes' )
203202 . then ( ( m ) => m . ROUTES ) ,
204- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
203+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
205204 } ,
206205 {
207206 path : PROFILE_MODULE_PATH ,
208207 loadChildren : ( ) => import ( './profile-page/profile-page-routes' )
209208 . then ( ( m ) => m . ROUTES ) ,
210209 providers : [ provideSuggestionNotificationsState ( ) ] ,
211- canActivate : [ authenticatedGuard , ... mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ] ,
210+ canActivate : [ authenticatedGuard , endUserAgreementCurrentUserGuard ] ,
212211 } ,
213212 {
214213 path : PROCESS_MODULE_PATH ,
215214 loadChildren : ( ) => import ( './process-page/process-page-routes' )
216215 . then ( ( m ) => m . ROUTES ) ,
217- canActivate : [ authenticatedGuard , ... mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ] ,
216+ canActivate : [ authenticatedGuard , endUserAgreementCurrentUserGuard ] ,
218217 } ,
219218 {
220219 path : SUGGESTION_MODULE_PATH ,
221220 loadChildren : ( ) => import ( './suggestions-page/suggestions-page-routes' )
222221 . then ( ( m ) => m . ROUTES ) ,
223222 providers : [ provideSuggestionNotificationsState ( ) ] ,
224- canActivate : [ authenticatedGuard , ... mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ] ,
223+ canActivate : [ authenticatedGuard , endUserAgreementCurrentUserGuard ] ,
225224 } ,
226225 {
227226 path : INFO_MODULE_PATH ,
@@ -230,7 +229,7 @@ export const APP_ROUTES: Route[] = [
230229 {
231230 path : REQUEST_COPY_MODULE_PATH ,
232231 loadChildren : ( ) => import ( './request-copy/request-copy-routes' ) . then ( ( m ) => m . ROUTES ) ,
233- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
232+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
234233 } ,
235234 {
236235 path : FORBIDDEN_PATH ,
@@ -240,7 +239,7 @@ export const APP_ROUTES: Route[] = [
240239 path : 'statistics' ,
241240 loadChildren : ( ) => import ( './statistics-page/statistics-page-routes' )
242241 . then ( ( m ) => m . ROUTES ) ,
243- canActivate : mapToCanActivate ( [ EndUserAgreementCurrentUserGuard ] ) ,
242+ canActivate : [ endUserAgreementCurrentUserGuard ] ,
244243 } ,
245244 {
246245 path : HEALTH_PAGE_PATH ,
@@ -250,7 +249,7 @@ export const APP_ROUTES: Route[] = [
250249 {
251250 path : ACCESS_CONTROL_MODULE_PATH ,
252251 loadChildren : ( ) => import ( './access-control/access-control-routes' ) . then ( ( m ) => m . ROUTES ) ,
253- canActivate : [ groupAdministratorGuard , EndUserAgreementCurrentUserGuard ] ,
252+ canActivate : [ groupAdministratorGuard , endUserAgreementCurrentUserGuard ] ,
254253 } ,
255254 {
256255 path : 'subscriptions' ,
0 commit comments