1
0

[DURACOM-234] Made use of mapToCanActivate for all the guards which are still Class

This commit is contained in:
Giuseppe Digilio
2024-04-02 13:13:25 +02:00
parent 19548fc6d4
commit 32b816c1aa
13 changed files with 109 additions and 72 deletions

View File

@@ -1,5 +1,8 @@
import { AbstractControl } from '@angular/forms';
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import {
DYNAMIC_ERROR_MESSAGES_MATCHER,
DynamicErrorMessagesMatcher,
@@ -43,7 +46,7 @@ export const ROUTES: Route[] = [
},
providers,
data: { title: 'admin.access-control.epeople.title', breadcrumbKey: 'admin.access-control.epeople' },
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
},
{
path: `${EPERSON_PATH}/create`,
@@ -53,7 +56,7 @@ export const ROUTES: Route[] = [
},
providers,
data: { title: 'admin.access-control.epeople.add.title', breadcrumbKey: 'admin.access-control.epeople.add' },
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
},
{
path: `${EPERSON_PATH}/:id/edit`,
@@ -64,7 +67,7 @@ export const ROUTES: Route[] = [
},
providers,
data: { title: 'admin.access-control.epeople.edit.title', breadcrumbKey: 'admin.access-control.epeople.edit' },
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
},
{
path: GROUP_PATH,
@@ -74,7 +77,7 @@ export const ROUTES: Route[] = [
},
providers,
data: { title: 'admin.access-control.groups.title', breadcrumbKey: 'admin.access-control.groups' },
canActivate: [GroupAdministratorGuard],
canActivate: mapToCanActivate([GroupAdministratorGuard]),
},
{
path: `${GROUP_PATH}/create`,
@@ -87,7 +90,7 @@ export const ROUTES: Route[] = [
title: 'admin.access-control.groups.title.addGroup',
breadcrumbKey: 'admin.access-control.groups.addGroup',
},
canActivate: [GroupAdministratorGuard],
canActivate: mapToCanActivate([GroupAdministratorGuard]),
},
{
path: `${GROUP_PATH}/:groupId/edit`,
@@ -100,7 +103,7 @@ export const ROUTES: Route[] = [
title: 'admin.access-control.groups.title.singleGroup',
breadcrumbKey: 'admin.access-control.groups.singleGroup',
},
canActivate: [GroupPageGuard],
canActivate: mapToCanActivate([GroupPageGuard]),
},
{
path: 'bulk-access',
@@ -109,6 +112,6 @@ export const ROUTES: Route[] = [
breadcrumb: I18nBreadcrumbResolver,
},
data: { title: 'admin.access-control.bulk-access.title', breadcrumbKey: 'admin.access-control.bulk-access' },
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
},
];

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { NotifyInfoGuard } from '../../core/coar-notify/notify-info/notify-info.guard';
@@ -9,7 +12,7 @@ import { AdminNotifyOutgoingComponent } from './admin-notify-logs/admin-notify-o
export const ROUTES: Route[] = [
{
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
canActivate: [...mapToCanActivate([SiteAdministratorGuard]), NotifyInfoGuard],
path: '',
resolve: {
breadcrumb: I18nBreadcrumbResolver,
@@ -27,7 +30,7 @@ export const ROUTES: Route[] = [
breadcrumb: I18nBreadcrumbResolver,
},
component: AdminNotifyIncomingComponent,
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
canActivate: [...mapToCanActivate([SiteAdministratorGuard]), NotifyInfoGuard],
data: {
title: 'admin.notify.dashboard.page.title',
breadcrumbKey: 'admin.notify.dashboard',
@@ -39,7 +42,7 @@ export const ROUTES: Route[] = [
breadcrumb: I18nBreadcrumbResolver,
},
component: AdminNotifyOutgoingComponent,
canActivate: [SiteAdministratorGuard, NotifyInfoGuard],
canActivate: [...mapToCanActivate([SiteAdministratorGuard]), NotifyInfoGuard],
data: {
title: 'admin.notify.dashboard.page.title',
breadcrumbKey: 'admin.notify.dashboard',

View File

@@ -1,5 +1,6 @@
import {
InMemoryScrollingOptions,
mapToCanActivate,
Route,
RouterConfigOptions,
} from '@angular/router';
@@ -65,105 +66,105 @@ export const APP_ROUTES: Route[] = [
.then((m) => m.ROUTES),
data: { showBreadcrumbs: false },
providers: [provideSuggestionNotificationsState()],
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'community-list',
loadChildren: () => import('./community-list-page/community-list-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'id',
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'handle',
loadChildren: () => import('./lookup-by-id/lookup-by-id-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: REGISTER_PATH,
loadChildren: () => import('./register-page/register-page-routes')
.then((m) => m.ROUTES),
canActivate: [SiteRegisterGuard],
canActivate: mapToCanActivate([SiteRegisterGuard]),
},
{
path: FORGOT_PASSWORD_PATH,
loadChildren: () => import('./forgot-password/forgot-password-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard, ForgotPasswordCheckGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard, ForgotPasswordCheckGuard]),
},
{
path: COMMUNITY_MODULE_PATH,
loadChildren: () => import('./community-page/community-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: COLLECTION_MODULE_PATH,
loadChildren: () => import('./collection-page/collection-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: ITEM_MODULE_PATH,
loadChildren: () => import('./item-page/item-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'entities/:entity-type',
loadChildren: () => import('./item-page/item-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: LEGACY_BITSTREAM_MODULE_PATH,
loadChildren: () => import('./bitstream-page/bitstream-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: BITSTREAM_MODULE_PATH,
loadChildren: () => import('./bitstream-page/bitstream-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'mydspace',
loadChildren: () => import('./my-dspace-page/my-dspace-page-routes')
.then((m) => m.ROUTES),
providers: [provideSuggestionNotificationsState()],
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([EndUserAgreementCurrentUserGuard])],
},
{
path: 'search',
loadChildren: () => import('./search-page/search-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'browse',
loadChildren: () => import('./browse-by/browse-by-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: ADMIN_MODULE_PATH,
loadChildren: () => import('./admin/admin-routes')
.then((m) => m.ROUTES),
canActivate: [SiteAdministratorGuard, EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard, EndUserAgreementCurrentUserGuard]),
},
{
path: NOTIFICATIONS_MODULE_PATH,
loadChildren: () => import('./quality-assurance-notifications-pages/notifications-pages-routes')
.then((m) => m.ROUTES),
providers: [provideSuggestionNotificationsState()],
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([EndUserAgreementCurrentUserGuard])],
},
{
path: 'login',
@@ -180,47 +181,47 @@ export const APP_ROUTES: Route[] = [
loadChildren: () => import('./submit-page/submit-page-routes')
.then((m) => m.ROUTES),
providers: [provideSubmissionState()],
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'import-external',
loadChildren: () => import('./import-external-page/import-external-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: 'workspaceitems',
loadChildren: () => import('./workspaceitems-edit-page/workspaceitems-edit-page-routes')
.then((m) => m.ROUTES),
providers: [provideSubmissionState()],
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: WORKFLOW_ITEM_MODULE_PATH,
providers: [provideSubmissionState()],
loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: PROFILE_MODULE_PATH,
loadChildren: () => import('./profile-page/profile-page-routes')
.then((m) => m.ROUTES),
providers: [provideSuggestionNotificationsState()],
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([EndUserAgreementCurrentUserGuard])],
},
{
path: PROCESS_MODULE_PATH,
loadChildren: () => import('./process-page/process-page-routes')
.then((m) => m.ROUTES),
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([EndUserAgreementCurrentUserGuard])],
},
{
path: SUGGESTION_MODULE_PATH,
loadChildren: () => import('./suggestions-page/suggestions-page-routes')
.then((m) => m.ROUTES),
providers: [provideSuggestionNotificationsState()],
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([EndUserAgreementCurrentUserGuard])],
},
{
path: INFO_MODULE_PATH,
@@ -229,7 +230,7 @@ export const APP_ROUTES: Route[] = [
{
path: REQUEST_COPY_MODULE_PATH,
loadChildren: () => import('./request-copy/request-copy-routes').then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: FORBIDDEN_PATH,
@@ -239,7 +240,7 @@ export const APP_ROUTES: Route[] = [
path: 'statistics',
loadChildren: () => import('./statistics-page/statistics-page-routes')
.then((m) => m.ROUTES),
canActivate: [EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([EndUserAgreementCurrentUserGuard]),
},
{
path: HEALTH_PAGE_PATH,
@@ -249,7 +250,7 @@ export const APP_ROUTES: Route[] = [
{
path: ACCESS_CONTROL_MODULE_PATH,
loadChildren: () => import('./access-control/access-control-routes').then((m) => m.ROUTES),
canActivate: [GroupAdministratorGuard, EndUserAgreementCurrentUserGuard],
canActivate: mapToCanActivate([GroupAdministratorGuard, EndUserAgreementCurrentUserGuard]),
},
{
path: 'subscriptions',

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { BrowseByGuard } from '../browse-by/browse-by-guard';
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
@@ -44,7 +47,7 @@ export const ROUTES: Route[] = [
path: COLLECTION_EDIT_PATH,
loadChildren: () => import('./edit-collection-page/edit-collection-page-routes')
.then((m) => m.ROUTES),
canActivate: [CollectionPageAdministratorGuard],
canActivate: mapToCanActivate([CollectionPageAdministratorGuard]),
},
{
path: 'delete',

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { CollectionAdministratorGuard } from '../../core/data/feature-authorization/feature-authorization-guard/collection-administrator.guard';
@@ -27,7 +30,7 @@ export const ROUTES: Route[] = [
},
data: { breadcrumbKey: 'collection.edit' },
component: EditCollectionPageComponent,
canActivate: [CollectionAdministratorGuard],
canActivate: mapToCanActivate([CollectionAdministratorGuard]),
children: [
{
path: '',

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { BrowseByGuard } from '../browse-by/browse-by-guard';
import { BrowseByI18nBreadcrumbResolver } from '../browse-by/browse-by-i18n-breadcrumb.resolver';
@@ -41,7 +44,7 @@ export const ROUTES: Route[] = [
path: COMMUNITY_EDIT_PATH,
loadChildren: () => import('./edit-community-page/edit-community-page-routes')
.then((m) => m.ROUTES),
canActivate: [CommunityPageAdministratorGuard],
canActivate: mapToCanActivate([CommunityPageAdministratorGuard]),
},
{
path: 'delete',

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { CommunityAdministratorGuard } from '../../core/data/feature-authorization/feature-authorization-guard/community-administrator.guard';
@@ -25,7 +28,7 @@ export const ROUTES: Route[] = [
},
data: { breadcrumbKey: 'community.edit' },
component: EditCommunityPageComponent,
canActivate: [CommunityAdministratorGuard],
canActivate: mapToCanActivate([CommunityAdministratorGuard]),
children: [
{
path: '',

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
import { SiteAdministratorGuard } from '../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
@@ -12,7 +15,7 @@ export const ROUTES: Route[] = [
breadcrumbKey: 'health',
title: 'health-page.title',
},
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
component: HealthPageComponent,
},
];

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component';
@@ -69,31 +72,31 @@ export const ROUTES: Route[] = [
path: 'status',
component: ThemedItemStatusComponent,
data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true },
canActivate: [ItemPageStatusGuard],
canActivate: mapToCanActivate([ItemPageStatusGuard]),
},
{
path: 'bitstreams',
component: ItemBitstreamsComponent,
data: { title: 'item.edit.tabs.bitstreams.title', showBreadcrumbs: true },
canActivate: [ItemPageBitstreamsGuard],
canActivate: mapToCanActivate([ItemPageBitstreamsGuard]),
},
{
path: 'metadata',
component: ThemedDsoEditMetadataComponent,
data: { title: 'item.edit.tabs.metadata.title', showBreadcrumbs: true },
canActivate: [ItemPageMetadataGuard],
canActivate: mapToCanActivate([ItemPageMetadataGuard]),
},
{
path: 'curate',
component: ItemCurateComponent,
data: { title: 'item.edit.tabs.curate.title', showBreadcrumbs: true },
canActivate: [ItemPageCurateGuard],
canActivate: mapToCanActivate([ItemPageCurateGuard]),
},
{
path: 'relationships',
component: ItemRelationshipsComponent,
data: { title: 'item.edit.tabs.relationships.title', showBreadcrumbs: true },
canActivate: [ItemPageRelationshipsGuard],
canActivate: mapToCanActivate([ItemPageRelationshipsGuard]),
},
/* TODO - uncomment & fix when view page exists
{
@@ -111,19 +114,19 @@ export const ROUTES: Route[] = [
path: 'versionhistory',
component: ItemVersionHistoryComponent,
data: { title: 'item.edit.tabs.versionhistory.title', showBreadcrumbs: true },
canActivate: [ItemPageVersionHistoryGuard],
canActivate: mapToCanActivate([ItemPageVersionHistoryGuard]),
},
{
path: 'access-control',
component: ItemAccessControlComponent,
data: { title: 'item.edit.tabs.access-control.title', showBreadcrumbs: true },
canActivate: [ItemPageAccessControlGuard],
canActivate: mapToCanActivate([ItemPageAccessControlGuard]),
},
{
path: 'mapper',
component: ItemCollectionMapperComponent,
data: { title: 'item.edit.tabs.item-mapper.title', showBreadcrumbs: true },
canActivate: [ItemPageCollectionMapperGuard],
canActivate: mapToCanActivate([ItemPageCollectionMapperGuard]),
},
],
},
@@ -134,12 +137,12 @@ export const ROUTES: Route[] = [
{
path: ITEM_EDIT_WITHDRAW_PATH,
component: ItemWithdrawComponent,
canActivate: [ItemPageWithdrawGuard],
canActivate: mapToCanActivate([ItemPageWithdrawGuard]),
},
{
path: ITEM_EDIT_REINSTATE_PATH,
component: ItemReinstateComponent,
canActivate: [ItemPageReinstateGuard],
canActivate: mapToCanActivate([ItemPageReinstateGuard]),
},
{
path: ITEM_EDIT_PRIVATE_PATH,
@@ -161,7 +164,7 @@ export const ROUTES: Route[] = [
{
path: ITEM_EDIT_REGISTER_DOI_PATH,
component: ItemRegisterDoiComponent,
canActivate: [ItemPageRegisterDoiGuard],
canActivate: mapToCanActivate([ItemPageRegisterDoiGuard]),
data: { title: 'item.edit.register-doi.title' },
},
{

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { REQUEST_COPY_MODULE_PATH } from '../app-routing-paths';
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
@@ -57,7 +60,7 @@ export const ROUTES: Route[] = [
{
path: ORCID_PATH,
component: OrcidPageComponent,
canActivate: [AuthenticatedGuard, OrcidPageGuard],
canActivate: [AuthenticatedGuard, ...mapToCanActivate([OrcidPageGuard])],
},
],
data: {

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { EndUserAgreementCookieGuard } from '../core/end-user-agreement/end-user-agreement-cookie.guard';
import { ThemedCreateProfileComponent } from './create-profile/themed-create-profile.component';
@@ -17,7 +20,7 @@ export const ROUTES: Route[] = [
component: ThemedCreateProfileComponent,
canActivate: [
RegistrationGuard,
EndUserAgreementCookieGuard,
...mapToCanActivate([EndUserAgreementCookieGuard]),
],
},
];

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { CollectionPageResolver } from '../collection-page/collection-page.resolver';
import { CommunityPageResolver } from '../community-page/community-page.resolver';
@@ -26,7 +29,7 @@ export const ROUTES: Route[] = [
component: ThemedSiteStatisticsPageComponent,
},
],
canActivate: [StatisticsAdministratorGuard],
canActivate: mapToCanActivate([StatisticsAdministratorGuard]),
},
{
path: `items/:id`,
@@ -39,7 +42,7 @@ export const ROUTES: Route[] = [
breadcrumbKey: 'statistics',
},
component: ThemedItemStatisticsPageComponent,
canActivate: [StatisticsAdministratorGuard],
canActivate: mapToCanActivate([StatisticsAdministratorGuard]),
},
{
path: `collections/:id`,
@@ -52,7 +55,7 @@ export const ROUTES: Route[] = [
breadcrumbKey: 'statistics',
},
component: ThemedCollectionStatisticsPageComponent,
canActivate: [StatisticsAdministratorGuard],
canActivate: mapToCanActivate([StatisticsAdministratorGuard]),
},
{
path: `communities/:id`,
@@ -65,6 +68,6 @@ export const ROUTES: Route[] = [
breadcrumbKey: 'statistics',
},
component: ThemedCommunityStatisticsPageComponent,
canActivate: [StatisticsAdministratorGuard],
canActivate: mapToCanActivate([StatisticsAdministratorGuard]),
},
];

View File

@@ -1,4 +1,7 @@
import { Route } from '@angular/router';
import {
mapToCanActivate,
Route,
} from '@angular/router';
import { SiteAdministratorGuard } from '../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
import { SystemWideAlertFormComponent } from './alert-form/system-wide-alert-form.component';
@@ -6,7 +9,7 @@ import { SystemWideAlertFormComponent } from './alert-form/system-wide-alert-for
export const ROUTES: Route[] = [
{
path: '',
canActivate: [SiteAdministratorGuard],
canActivate: mapToCanActivate([SiteAdministratorGuard]),
component: SystemWideAlertFormComponent,
},