From bca8d10016dbc424bc904f67a5ef3c189f57a9f3 Mon Sep 17 00:00:00 2001 From: valentinkolb Date: Tue, 14 May 2024 17:07:01 +0200 Subject: [PATCH] fix(app): bug fix when creating an event --- src/pages/events/EventOverview/CreateEvent.tsx | 4 ---- src/pages/events/EventOverview/index.page.tsx | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/events/EventOverview/CreateEvent.tsx b/src/pages/events/EventOverview/CreateEvent.tsx index 4d817e1..507c2f0 100644 --- a/src/pages/events/EventOverview/CreateEvent.tsx +++ b/src/pages/events/EventOverview/CreateEvent.tsx @@ -46,9 +46,6 @@ export default function CreateEvent({onSuccess, onAbort}: { const createEventMutation = useMutation({ mutationFn: async () => { - if (!user || user.REALM === "LDAP") { - throw new Error("Nur mit StuVe IT Account eingeloggte Personen können Events erstellen") - } return await pb.collection("events").create({ ...formValues.values, eventAdmins: formValues.values.eventAdmins.map((member) => member.id), @@ -79,7 +76,6 @@ export default function CreateEvent({onSuccess, onAbort}: { Du kannst auch alle Werte die du hier angibst später noch bearbeiten. - diff --git a/src/pages/events/EventOverview/index.page.tsx b/src/pages/events/EventOverview/index.page.tsx index e42afa4..b2044ce 100644 --- a/src/pages/events/EventOverview/index.page.tsx +++ b/src/pages/events/EventOverview/index.page.tsx @@ -30,7 +30,7 @@ export default function EventOverview() { { - (user && user.REALM === "LDAP") && <> + (user) && <>