fix wrong getCalendarsForUser using getCalendarsForPrincipal
This commit is contained in:
1 parent
ee452aecec
commit
853228b6a9
1 file changed
+8
-2
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user