Commit 0cc89fd2 authored by George Kalampokis's avatar George Kalampokis

Added AuthGuard on Dataset create wizard and user profile in order to be...

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)
parent 64e32639
......@@ -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
},
......
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 { }
\ No newline at end of file
export class UserProfileRoutingModule { }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment