mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge remote-tracking branch 'remotes/origin/master' into shibboleth
# Conflicts: # src/app/app-routing.module.ts # src/app/core/auth/auth.service.ts # src/app/shared/shared.module.ts
This commit is contained in:
@@ -3,7 +3,6 @@ import { RouterModule } from '@angular/router';
|
||||
|
||||
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
|
||||
import { AuthenticatedGuard } from './core/auth/authenticated.guard';
|
||||
import { Breadcrumb } from './breadcrumbs/breadcrumb/breadcrumb.model';
|
||||
import { DSpaceObject } from './core/shared/dspace-object.model';
|
||||
import { Community } from './core/shared/community.model';
|
||||
import { getCommunityPageRoute } from './+community-page/community-page-routing.module';
|
||||
@@ -11,7 +10,6 @@ import { Collection } from './core/shared/collection.model';
|
||||
import { Item } from './core/shared/item.model';
|
||||
import { getItemPageRoute } from './+item-page/item-page-routing.module';
|
||||
import { getCollectionPageRoute } from './+collection-page/collection-page-routing.module';
|
||||
import { BrowseByDSOBreadcrumbResolver } from './+browse-by/browse-by-dso-breadcrumb.resolver';
|
||||
|
||||
const ITEM_MODULE_PATH = 'items';
|
||||
|
||||
@@ -37,6 +35,12 @@ export function getAdminModulePath() {
|
||||
return `/${ADMIN_MODULE_PATH}`;
|
||||
}
|
||||
|
||||
const PROFILE_MODULE_PATH = 'profile';
|
||||
|
||||
export function getProfileModulePath() {
|
||||
return `/${PROFILE_MODULE_PATH}`;
|
||||
}
|
||||
|
||||
export function getDSOPath(dso: DSpaceObject): string {
|
||||
switch ((dso as any).type) {
|
||||
case Community.type.value:
|
||||
@@ -78,8 +82,15 @@ export function getDSOPath(dso: DSpaceObject): string {
|
||||
path: 'workflowitems',
|
||||
loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowItemsEditPageModule'
|
||||
},
|
||||
{
|
||||
path: PROFILE_MODULE_PATH,
|
||||
loadChildren: './profile-page/profile-page.module#ProfilePageModule', canActivate: [AuthenticatedGuard]
|
||||
},
|
||||
{ path: '**', pathMatch: 'full', component: PageNotFoundComponent },
|
||||
])
|
||||
],
|
||||
{
|
||||
onSameUrlNavigation: 'reload',
|
||||
})
|
||||
],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
|
Reference in New Issue
Block a user