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:
Giuseppe Digilio
2020-03-23 10:36:19 +01:00
152 changed files with 5929 additions and 555 deletions

View File

@@ -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],
})