From 846ddc1f6329030b7f737a9742fe0fc368ce7389 Mon Sep 17 00:00:00 2001
From: Ruben Bimberg <ruben.bimberg@mni.thm.de>
Date: Mon, 28 Jun 2021 00:32:44 +0200
Subject: [PATCH] Fix authentication bug

If a creator gets the role participant,
he cannot see this room as a creator.
---
 src/app/components/shared/room-join/room-join.component.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/app/components/shared/room-join/room-join.component.ts b/src/app/components/shared/room-join/room-join.component.ts
index 6a4cd1748..cc6a6ea8e 100644
--- a/src/app/components/shared/room-join/room-join.component.ts
+++ b/src/app/components/shared/room-join/room-join.component.ts
@@ -93,6 +93,7 @@ export class RoomJoinComponent implements OnInit {
 
   addAndNavigate() {
     if (this.user.id === this.room.ownerId) {
+      this.authenticationService.setAccess(this.room.shortId, UserRole.CREATOR);
       this.router.navigate([`/creator/room/${this.room.shortId}/comments`]);
     } else {
       this.roomService.addToHistory(this.room.id);
-- 
GitLab