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 { DatasetDmpSelector } from './dmp-selector/dataset-dmp-selector.component';
|
||||
import { CanDeactivateGuard } from '../../library/deactivate/can-deactivate.guard';
|
||||
import { AuthGuard } from '@app/core/auth-guard.service';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DatasetCreateWizard,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
breadcrumb: true
|
||||
},
|
||||
|
@ -16,6 +18,7 @@ const routes: Routes = [
|
|||
{
|
||||
path: '',
|
||||
component: DatasetDmpSelector,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
breadcrumb: true
|
||||
},
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { UserProfileComponent } from './user-profile.component';
|
||||
import { AuthGuard } from '@app/core/auth-guard.service';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: UserProfileComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
breadcrumb: true
|
||||
},
|
||||
|
@ -16,4 +18,4 @@ const routes: Routes = [
|
|||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class UserProfileRoutingModule { }
|
||||
export class UserProfileRoutingModule { }
|
||||
|
|
Loading…
Reference in New Issue