[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
+1 -1
View File
@@ -57,7 +57,7 @@ export function EventChip({
// Event properties
const isPrivate = PRIVATE_CLASSIFICATIONS.includes(classification);
const ownerEmails = new Set(
calendar.ownerEmails?.map((e) => e.toLowerCase())
calendar.owner?.emails?.map((e) => e.toLowerCase())
);
// const delegated = calendar.delegated;
@@ -12,6 +12,7 @@ import { PartStat } from "@/features/User/models/attendee";
import { createAttendee } from "@/features/User/models/attendee.mapper";
import { userData } from "@/features/User/userDataTypes";
import { buildFamilyName } from "@/utils/buildFamilyName";
import { isEventOrganiser } from "@/utils/isEventOrganiser";
function updateEventAttendees(
event: CalendarEvent,
@@ -23,9 +24,7 @@ function updateEventAttendees(
}
const eventHasNoAttendees = !event?.attendee || event.attendee.length === 0;
const isOrganizer =
!event.organizer ||
event.organizer.cal_address?.toLowerCase() === user.email?.toLowerCase();
const isOrganizer = isEventOrganiser(event, user.email);
if (eventHasNoAttendees) {
const userdata = createAttendee({
cal_address: user.email,