diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index ae91199e709f47ad39f81b802db65a3eb5f0e79f..1d63c142089aaaebecc4857211c9e9d3d86ad64f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -31,7 +31,8 @@ const routes: Routes = [ }, { path: 'room/:roomId/create-comment', component: CreateCommentComponent, - canActivate: [AuthenticationGuard] + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } }, { path: '**', component: PageNotFoundComponent } ]; diff --git a/src/app/room/room.component.html b/src/app/room/room.component.html index c53d313290a9d8e6b3c34f3188fc71c30686747e..28ddbdd81a2afdb2a41d76b118c2eccc58af98f3 100644 --- a/src/app/room/room.component.html +++ b/src/app/room/room.component.html @@ -7,6 +7,10 @@ <mat-list-item>Name: {{room.name}}</mat-list-item> <mat-list-item>Description: {{room.description}}</mat-list-item> <mat-list-item>Closed: {{room.closed}}</mat-list-item> + + <button mat-button routerLink="/room/{{room.id}}/create-comment"> + Create comment + </button> </mat-list> <!-- content-type of room-->