diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 41f01d91ee85694d922216fac8a6b2357e198c44..619bdd7efa315b4b3515b06397d3e0ab0577d348 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -31,7 +31,12 @@ const routes: Routes = [ component: RoomComponent, canActivate: [AuthenticationGuard] }, - { path: 'room/:roomId/comments', component: CommentComponent }, + { + path: 'room/:roomId/comments', + component: CommentComponent, + canActivate: [AuthenticationGuard], + data: {roles: [UserRole.CREATOR] } + }, { path: 'room/:roomId/create-comment', component: CreateCommentComponent, canActivate: [AuthenticationGuard], diff --git a/src/app/room/room.component.html b/src/app/room/room.component.html index 3b4c66037407a393fad34f0dd8e0267742b2c253..581e828d571ba5ae17e6fcd65018df714e08dfeb 100644 --- a/src/app/room/room.component.html +++ b/src/app/room/room.component.html @@ -11,6 +11,10 @@ <button mat-button routerLink="/room/{{room.id}}/create-comment"> Create comment <!-- Only for participant --> </button> + + <button mat-button routerLink="/room/{{room.id}}/comments"> + Visit comments <!-- Only for creator --> + </button> </mat-list> <!-- content-type of room-->