diff --git a/__test__/features/Events/EventFullDisplay.delegated.test.tsx b/__test__/features/Events/EventFullDisplay.delegated.test.tsx index 81d1a05..5c61fcf 100644 --- a/__test__/features/Events/EventFullDisplay.delegated.test.tsx +++ b/__test__/features/Events/EventFullDisplay.delegated.test.tsx @@ -56,6 +56,7 @@ describe("Event Full Display — delegated calendar move", () => { name: "Delegated Calendar", color: "#00FF00", delegated: true, + access: { write: true }, owner: { emails: ["delegate@test.com"], name: "Delegate User", diff --git a/src/features/Events/EventUpdateModal.tsx b/src/features/Events/EventUpdateModal.tsx index 3e7ccfe..20499d6 100644 --- a/src/features/Events/EventUpdateModal.tsx +++ b/src/features/Events/EventUpdateModal.tsx @@ -76,13 +76,12 @@ function EventUpdateModal({ const user = useAppSelector((state) => state.user); - // if the event's calendar is delegated then it shall be the only calendar accessible from the event update modal const userPersonalCalendars: Calendar[] = useMemo(() => { const allCalendars = Object.values(calList) as Calendar[]; return allCalendars.filter( (calendar: Calendar) => calendar.id?.split("/")[0] === user.userData?.openpaasId || - calendar.delegated + (calendar.delegated && calendar.access?.write) ); }, [calList, user.userData?.openpaasId]);