-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dav): Directly access shared calendars by URI #36681
base: master
Are you sure you want to change the base?
Conversation
Each time we access a shared calendar details (with getChild), this loads every user's calendars and iterates until the correct one is found. Now we lookup from the shared calendars which ones has the correct URI, just iterating on the possible shares (for instance a calendar can be shared directly through user-to-user share or through user-to-group share). Signed-off-by: Thomas Citharel <tcit@tcit.fr>
} | ||
|
||
$readOnly = (int)$row['access'] === Backend::ACCESS_READ; | ||
if (isset($calendars[$row['id']])) { |
Check failure
Code scanning / Psalm
UndefinedVariable
} | ||
|
||
// Fixes for shared calendars | ||
[, $name] = Uri\split($row['principaluri']); |
Check failure
Code scanning / Psalm
UndefinedFunction
$readOnlyPropertyName => $readOnly, | ||
]; | ||
} | ||
$calendar = $this->rowToCalendar($row, $calendar); |
Check notice
Code scanning / Psalm
PossiblyUndefinedVariable
$readOnlyPropertyName => $readOnly, | ||
]; | ||
} | ||
$calendar = $this->rowToCalendar($row, $calendar); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
Each time we access a shared calendar details (with getChild), this loads every user's calendars and iterates until the correct one is found. Now we lookup from the shared calendars which ones has the correct URI, just iterating on the possible shares (for instance a calendar can be shared directly through user-to-user share or through user-to-group share).
Didn't mesure properly the performance benefits, but should be really nice with many shared calendars.
Follow-up to #33608
TODO
Checklist