[DELEGATION] Edit attendance and events, delete event for someone (#553)

* [#523] added way to manage attendance for delegated calendars

* [DELEGATION] #523 & #524 changed eventURL calculation for delegated events to have the rigth one

* [#524] added drag and drop authorisation to delegated event

* [#524] added tests

* [#524] support for the permission access

* [#524] no edit when delegated event is not public
This commit is contained in:
Camille Moussu
2026-02-19 09:50:29 +01:00
committed by GitHub
parent f520a9b6fe
commit cfb2b59584
52 changed files with 1116 additions and 219 deletions
+5 -3
View File
@@ -7,15 +7,17 @@ export function createEventContext(
calendar: Calendar,
user: userData
): ContextualizedEvent {
const isOwn = calendar.ownerEmails?.includes(user.email) ?? false;
const isOwn = calendar.owner?.emails?.includes(user.email) ?? false;
const isRecurring = event?.uid?.includes("/") ?? false;
const isOrganizer = event.organizer
? user?.email === event.organizer.cal_address
: isOwn;
const attendeeEmail = calendar.delegated
? calendar.owner?.emails?.[0]
: user.email;
const currentUserAttendee = event.attendee?.find(
(person) => person.cal_address === user.email
(person) => person.cal_address === attendeeEmail
);
return {
event,
calendar,