fix wrong getCalendarsForUser using getCalendarsForPrincipal

This commit is contained in:
stefan.tollkuehn committed 2026-10-07 22:57:00 +02:00
1 parent ee452aecec
commit 853228b6a9
1 file changed
+8 -2
+8 -2
View File
@@ -149,12 +149,18 @@ class CalendarController extends Controller
/** /**
* The user's "Personal" calendar. * The user's "Personal" calendar.
* *
* getCalendarsForUser() returns ICalendar objects. * getCalendarsForPrincipal() returns ICalendar objects.
* Only calendars implementing ICreateFromString are writable. * Only calendars implementing ICreateFromString are writable.
*/ */
private function findWritableCalendar(string $userId): ?ICreateFromString 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) { foreach ($calendars as $calendar) {
if (!$calendar instanceof ICreateFromString) { if (!$calendar instanceof ICreateFromString) {