54472: Authorization + tests (intermediate)

This commit is contained in:
Kristof De Langhe
2018-08-22 16:10:55 +02:00
parent dfa42acab5
commit d3e6dd5397
5 changed files with 168 additions and 19 deletions

View File

@@ -3,11 +3,12 @@ import { RouterModule } from '@angular/router';
import { CommunityPageComponent } from './community-page.component';
import { CreateCommunityPageComponent } from './create-community-page/create-community-page.component';
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'create', component: CreateCommunityPageComponent },
{ path: 'create', component: CreateCommunityPageComponent, canActivate: [AuthenticatedGuard] },
{ path: ':id', component: CommunityPageComponent, pathMatch: 'full' }
])
]