mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
[DURACOM-234] Made use of mapToCanActivate for all the guards which are still Class
This commit is contained in:
@@ -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',
|
||||
|
Reference in New Issue
Block a user