From 853228b6a9132c2b38b6d73c95a905277ab37642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tollk=C3=BChn?= Date: Wed, 7 Oct 2026 22:57:00 +0200 Subject: [PATCH] fix wrong getCalendarsForUser using getCalendarsForPrincipal --- lib/Controller/CalendarController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Controller/CalendarController.php b/lib/Controller/CalendarController.php index 3f71716..550e57c 100644 --- a/lib/Controller/CalendarController.php +++ b/lib/Controller/CalendarController.php @@ -149,12 +149,18 @@ class CalendarController extends Controller /** * The user's "Personal" calendar. * - * getCalendarsForUser() returns ICalendar objects. + * getCalendarsForPrincipal() returns ICalendar objects. * Only calendars implementing ICreateFromString are writable. */ private function findWritableCalendar(string $userId): ?ICreateFromString { - $calendars = $this->calendarManager->getCalendarsForUser($userId); + /* + * IManager kennt keine getCalendarsForUser() – + * Kalender werden über die Principal-URI abgefragt. + */ + $principalUri = 'principals/users/' . $userId; + + $calendars = $this->calendarManager->getCalendarsForPrincipal($principalUri); foreach ($calendars as $calendar) { if (!$calendar instanceof ICreateFromString) {