[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
+9
View File
@@ -0,0 +1,9 @@
import { Calendar } from "@/features/Calendars/CalendarTypes";
export function getEffectiveEmail(
calendar: Calendar | undefined,
isWriteDelegated: boolean,
userAddress: string | undefined
): string | undefined {
return isWriteDelegated ? calendar?.owner?.emails?.[0] : userAddress;
}
+11
View File
@@ -0,0 +1,11 @@
import { CalendarEvent } from "@/features/Events/EventsTypes";
export function isEventOrganiser(
event: CalendarEvent,
effectiveEmail: string | undefined
): boolean {
if (!event.organizer) return true; // no organizer = assume owner
const organizerEmail = event.organizer.cal_address?.toLowerCase();
if (!organizerEmail || !effectiveEmail) return false;
return organizerEmail === effectiveEmail.toLowerCase();
}