Removed double ssoLoginUrl from auth.state

This commit is contained in:
Julius Gruber
2019-08-02 13:05:57 +02:00
parent fb44c02437
commit f086ee79a5
2 changed files with 36 additions and 22 deletions

View File

@@ -1,41 +1,57 @@
import { NgModule } from '@angular/core'; import {NgModule} from '@angular/core';
import { RouterModule } from '@angular/router'; import {RouterModule} from '@angular/router';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; import {PageNotFoundComponent} from './pagenotfound/pagenotfound.component';
import { AuthenticatedGuard } from './core/auth/authenticated.guard'; import {AuthenticatedGuard} from './core/auth/authenticated.guard';
import {ShibbolethComponent} from './+login-page/shibboleth/shibboleth.component'; import {ShibbolethComponent} from './+login-page/shibboleth/shibboleth.component';
const ITEM_MODULE_PATH = 'items'; const ITEM_MODULE_PATH = 'items';
export function getItemModulePath() { export function getItemModulePath() {
return `/${ITEM_MODULE_PATH}`; return `/${ITEM_MODULE_PATH}`;
} }
const COLLECTION_MODULE_PATH = 'collections'; const COLLECTION_MODULE_PATH = 'collections';
export function getCollectionModulePath() { export function getCollectionModulePath() {
return `/${COLLECTION_MODULE_PATH}`; return `/${COLLECTION_MODULE_PATH}`;
} }
const COMMUNITY_MODULE_PATH = 'communities'; const COMMUNITY_MODULE_PATH = 'communities';
export function getCommunityModulePath() { export function getCommunityModulePath() {
return `/${COMMUNITY_MODULE_PATH}`; return `/${COMMUNITY_MODULE_PATH}`;
} }
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forRoot([ RouterModule.forRoot([
{ path: '', redirectTo: '/home', pathMatch: 'full' }, {path: '', redirectTo: '/home', pathMatch: 'full'},
{ path: 'home', loadChildren: './+home-page/home-page.module#HomePageModule' }, {path: 'home', loadChildren: './+home-page/home-page.module#HomePageModule'},
{ path: COMMUNITY_MODULE_PATH, loadChildren: './+community-page/community-page.module#CommunityPageModule' }, {path: COMMUNITY_MODULE_PATH, loadChildren: './+community-page/community-page.module#CommunityPageModule'},
{ path: COLLECTION_MODULE_PATH, loadChildren: './+collection-page/collection-page.module#CollectionPageModule' }, {path: COLLECTION_MODULE_PATH, loadChildren: './+collection-page/collection-page.module#CollectionPageModule'},
{ path: ITEM_MODULE_PATH, loadChildren: './+item-page/item-page.module#ItemPageModule' }, {path: ITEM_MODULE_PATH, loadChildren: './+item-page/item-page.module#ItemPageModule'},
{ path: 'mydspace', loadChildren: './+my-dspace-page/my-dspace-page.module#MyDSpacePageModule', canActivate: [AuthenticatedGuard] }, {
{ path: 'search', loadChildren: './+search-page/search-page.module#SearchPageModule' }, path: 'mydspace',
{ path: 'browse', loadChildren: './+browse-by/browse-by.module#BrowseByModule' }, loadChildren: './+my-dspace-page/my-dspace-page.module#MyDSpacePageModule',
{ path: 'admin', loadChildren: './+admin/admin.module#AdminModule', canActivate: [AuthenticatedGuard] }, canActivate: [AuthenticatedGuard]
{ path: 'login', loadChildren: './+login-page/login-page.module#LoginPageModule' }, },
{ path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' }, {path: 'search', loadChildren: './+search-page/search-page.module#SearchPageModule'},
{ path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' }, {path: 'browse', loadChildren: './+browse-by/browse-by.module#BrowseByModule'},
{ path: 'workspaceitems', loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule' }, {path: 'admin', loadChildren: './+admin/admin.module#AdminModule', canActivate: [AuthenticatedGuard]},
{ path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowitemsEditPageModule' }, {path: 'login', loadChildren: './+login-page/login-page.module#LoginPageModule'},
{ path: 'shibboleth', pathMatch: 'full', component: ShibbolethComponent }, {path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule'},
{ path: '**', pathMatch: 'full', component: PageNotFoundComponent }, {path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule'},
{path: 'shibboleth', pathMatch: 'full', component: ShibbolethComponent},
{
path: 'workspaceitems',
loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule'
},
/* {
path: 'workflowitems',
loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowitemsEditPageModule'
},*/
{path: '**', pathMatch: 'full', component: PageNotFoundComponent},
]) ])
], ],
exports: [RouterModule] exports: [RouterModule]

View File

@@ -42,8 +42,6 @@ export class AuthStatus implements CacheableObject {
*/ */
eperson: Observable<RemoteData<EPerson>>; eperson: Observable<RemoteData<EPerson>>;
ssoLoginUrl?: string;
/** /**
* True if the token is valid, false if there was no token or the token wasn't valid * True if the token is valid, false if there was no token or the token wasn't valid
*/ */