Added AuthGuard on Dataset create wizard and user profile in order to be prevented from access by users who haven't logged in (ref #227)
This commit is contained in:
parent
64e326396a
commit
0cc89fd260
|
@ -3,11 +3,13 @@ import { RouterModule, Routes } from '@angular/router';
|
||||||
import { DatasetCreateWizard } from './dataset-create-wizard.component';
|
import { DatasetCreateWizard } from './dataset-create-wizard.component';
|
||||||
import { DatasetDmpSelector } from './dmp-selector/dataset-dmp-selector.component';
|
import { DatasetDmpSelector } from './dmp-selector/dataset-dmp-selector.component';
|
||||||
import { CanDeactivateGuard } from '../../library/deactivate/can-deactivate.guard';
|
import { CanDeactivateGuard } from '../../library/deactivate/can-deactivate.guard';
|
||||||
|
import { AuthGuard } from '@app/core/auth-guard.service';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: DatasetCreateWizard,
|
component: DatasetCreateWizard,
|
||||||
|
canActivate: [AuthGuard],
|
||||||
data: {
|
data: {
|
||||||
breadcrumb: true
|
breadcrumb: true
|
||||||
},
|
},
|
||||||
|
@ -16,6 +18,7 @@ const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: DatasetDmpSelector,
|
component: DatasetDmpSelector,
|
||||||
|
canActivate: [AuthGuard],
|
||||||
data: {
|
data: {
|
||||||
breadcrumb: true
|
breadcrumb: true
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { UserProfileComponent } from './user-profile.component';
|
import { UserProfileComponent } from './user-profile.component';
|
||||||
|
import { AuthGuard } from '@app/core/auth-guard.service';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: UserProfileComponent,
|
component: UserProfileComponent,
|
||||||
|
canActivate: [AuthGuard],
|
||||||
data: {
|
data: {
|
||||||
breadcrumb: true
|
breadcrumb: true
|
||||||
},
|
},
|
||||||
|
@ -16,4 +18,4 @@ const routes: Routes = [
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class UserProfileRoutingModule { }
|
export class UserProfileRoutingModule { }
|
||||||
|
|
Loading…
Reference in New Issue