From 14548b0f92698694084e493ee2493ecf61a3aa5f Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Sun, 28 Jul 2024 17:23:35 +0200 Subject: [PATCH] fix(useEventRights): fixed bug where logged-out users appeared to have access to an event the user couldn't access any data since the bug only exits in the frontend but the ui didn't reflect that --- src/pages/events/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/events/util.ts b/src/pages/events/util.ts index af0c2ec..3fc8b9b 100644 --- a/src/pages/events/util.ts +++ b/src/pages/events/util.ts @@ -30,7 +30,7 @@ export const useEventRights = (event?: EventModel) => { return { canEditEvent: isEventAdmin || isStex, - isPrivilegedUser: privilegedUsers.includes(user?.id), + isPrivilegedUser: user && privilegedUsers.includes(user?.id), } }