From dd03ab7d9359c88d4459dc4e4005781308048bbc Mon Sep 17 00:00:00 2001 From: robbis95 <82042925+robbis95@users.noreply.github.com> Date: Sun, 20 Mar 2022 16:05:40 +0100 Subject: [PATCH] Fixed room settings button didn't show for Moderator --- src/components/navigator/views/NavigatorRoomInfoView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/navigator/views/NavigatorRoomInfoView.tsx b/src/components/navigator/views/NavigatorRoomInfoView.tsx index a85522b5..2a4bd16c 100644 --- a/src/components/navigator/views/NavigatorRoomInfoView.tsx +++ b/src/components/navigator/views/NavigatorRoomInfoView.tsx @@ -20,13 +20,15 @@ export const NavigatorRoomInfoView: FC = props => const [ isRoomPicked, setIsRoomPicked ] = useState(false); const [ isRoomMuted, setIsRoomMuted ] = useState(false); const { navigatorData = null } = useNavigatorContext(); + const isMod = GetSessionDataManager().isModerator; + const hasPermission = (permission: string) => { switch(permission) { case 'settings': - return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId); + return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId || isMod ); case 'staff_pick': return GetSessionDataManager().securityLevel >= SecurityLevel.COMMUNITY; default: return false;