Commits
Vlad Nouski authored ccf1cc45473
31 31 | } from './edit-item-page.routing-paths'; |
32 32 | import { ItemPageReinstateGuard } from './item-page-reinstate.guard'; |
33 33 | import { ItemPageWithdrawGuard } from './item-page-withdraw.guard'; |
34 34 | import { ItemPageMetadataGuard } from './item-page-metadata.guard'; |
35 35 | import { ItemPageAdministratorGuard } from '../item-page-administrator.guard'; |
36 36 | import { ItemPageStatusGuard } from './item-page-status.guard'; |
37 37 | import { ItemPageBitstreamsGuard } from './item-page-bitstreams.guard'; |
38 38 | import { ItemPageRelationshipsGuard } from './item-page-relationships.guard'; |
39 39 | import { ItemPageVersionHistoryGuard } from './item-page-version-history.guard'; |
40 40 | import { ItemPageCollectionMapperGuard } from './item-page-collection-mapper.guard'; |
41 + | import { ItemPageCurateGuard } from './item-page-curate.guard'; |
42 + | import { ItemPageAccessControlGuard } from './item-page-access-control.guard'; |
41 43 | import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component'; |
42 44 | import { ItemPageRegisterDoiGuard } from './item-page-register-doi.guard'; |
43 45 | import { ItemCurateComponent } from './item-curate/item-curate.component'; |
44 46 | import { ThemedItemStatusComponent } from './item-status/themed-item-status.component'; |
45 47 | import { ItemAccessControlComponent } from './item-access-control/item-access-control.component'; |
46 48 | |
47 49 | /** |
48 50 | * Routing module that handles the routing for the Edit Item page administrator functionality |
49 51 | */ |
50 52 | @NgModule({ |
80 82 | }, |
81 83 | { |
82 84 | path: 'metadata', |
83 85 | component: ThemedDsoEditMetadataComponent, |
84 86 | data: { title: 'item.edit.tabs.metadata.title', showBreadcrumbs: true }, |
85 87 | canActivate: [ItemPageMetadataGuard] |
86 88 | }, |
87 89 | { |
88 90 | path: 'curate', |
89 91 | component: ItemCurateComponent, |
90 - | data: { title: 'item.edit.tabs.curate.title', showBreadcrumbs: true } |
92 + | data: { title: 'item.edit.tabs.curate.title', showBreadcrumbs: true }, |
93 + | canActivate: [ItemPageCurateGuard] |
91 94 | }, |
92 95 | { |
93 96 | path: 'relationships', |
94 97 | component: ItemRelationshipsComponent, |
95 98 | data: { title: 'item.edit.tabs.relationships.title', showBreadcrumbs: true }, |
96 99 | canActivate: [ItemPageRelationshipsGuard] |
97 100 | }, |
98 101 | /* TODO - uncomment & fix when view page exists |
99 102 | { |
100 103 | path: 'view', |
109 112 | }, */ |
110 113 | { |
111 114 | path: 'versionhistory', |
112 115 | component: ItemVersionHistoryComponent, |
113 116 | data: { title: 'item.edit.tabs.versionhistory.title', showBreadcrumbs: true }, |
114 117 | canActivate: [ItemPageVersionHistoryGuard] |
115 118 | }, |
116 119 | { |
117 120 | path: 'access-control', |
118 121 | component: ItemAccessControlComponent, |
119 - | data: { title: 'item.edit.tabs.access-control.title', showBreadcrumbs: true } |
122 + | data: { title: 'item.edit.tabs.access-control.title', showBreadcrumbs: true }, |
123 + | canActivate: [ItemPageAccessControlGuard] |
120 124 | }, |
121 125 | { |
122 126 | path: 'mapper', |
123 127 | component: ItemCollectionMapperComponent, |
124 128 | data: { title: 'item.edit.tabs.item-mapper.title', showBreadcrumbs: true }, |
125 129 | canActivate: [ItemPageCollectionMapperGuard] |
126 130 | } |
127 131 | ] |
128 132 | }, |
129 133 | { |
195 199 | ], |
196 200 | providers: [ |
197 201 | I18nBreadcrumbResolver, |
198 202 | I18nBreadcrumbsService, |
199 203 | ResourcePolicyResolver, |
200 204 | ResourcePolicyTargetResolver, |
201 205 | ItemPageReinstateGuard, |
202 206 | ItemPageWithdrawGuard, |
203 207 | ItemPageAdministratorGuard, |
204 208 | ItemPageMetadataGuard, |
209 + | ItemPageCurateGuard, |
205 210 | ItemPageStatusGuard, |
206 211 | ItemPageBitstreamsGuard, |
207 212 | ItemPageRelationshipsGuard, |
208 213 | ItemPageVersionHistoryGuard, |
209 214 | ItemPageCollectionMapperGuard, |
215 + | ItemPageAccessControlGuard, |
210 216 | ItemPageRegisterDoiGuard, |
211 217 | ] |
212 218 | }) |
213 219 | export class EditItemPageRoutingModule { |
214 220 | |
215 221 | } |