Skip to content

feat(dav): Directly access shared calendars by URI - #36681

Closed
tcitworld wants to merge 1 commit into
masterfrom
direct-access-shared-calendar
Closed

feat(dav): Directly access shared calendars by URI#36681
tcitworld wants to merge 1 commit into
masterfrom
direct-access-shared-calendar

Conversation

@tcitworld

Copy link
Copy Markdown
Member

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

  • Add some tests for this new method

Checklist

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>
@tcitworldtcitworld added 2. developing Work in progress performance 🚀 feature: caldav Related to CalDAV internals labels Feb 13, 2023
@tcitworld
tcitworld requested review from a team, ArtificialOwl, blizzz and icewind1991 and removed request for a teamFebruary 13, 2023 08:32
}

$readOnly = (int)$row['access'] === Backend::ACCESS_READ;
if (isset($calendars[$row['id']])) {

Check failure

Code scanning / Psalm

UndefinedVariable

Cannot find referenced variable $calendars
}

// Fixes for shared calendars
[, $name] = Uri\split($row['principaluri']);

Check failure

Code scanning / Psalm

UndefinedFunction

Function Sabre\Uri\split does not exist
$readOnlyPropertyName => $readOnly,
];
}
$calendar = $this->rowToCalendar($row, $calendar);

Check notice

Code scanning / Psalm

PossiblyUndefinedVariable

Possibly undefined variable $row, first seen on line 694
$readOnlyPropertyName => $readOnly,
];
}
$calendar = $this->rowToCalendar($row, $calendar);

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 2 of OCA\DAV\CalDAV\CalDavBackend::rowToCalendar cannot be null, possibly null value provided
@blizzzblizzz added this to the Nextcloud 29 milestone Nov 23, 2023
This was referenced Mar 12, 2024
@AltahrimAltahrim mentioned this pull request Mar 20, 2024
@skjnldsvskjnldsv removed this from the Nextcloud 31 milestone Aug 14, 2024
@skjnldsv
skjnldsv deleted the direct-access-shared-calendar branch August 30, 2024 07:30
@tcitworld
tcitworld restored the direct-access-shared-calendar branch September 9, 2024 06:48
@tcitworldtcitworld reopened this Sep 9, 2024
@blizzz
blizzz removed their request for review September 11, 2024 08:33
@skjnldsvskjnldsv added this to the Nextcloud 32 milestone Jan 30, 2025
@blizzzblizzz removed this from the Nextcloud 33 milestone Feb 16, 2026
@blizzzblizzz added this to the Nextcloud 34 milestone Feb 16, 2026
@susnuxsusnux added the community pull requests from community label Jun 9, 2026
@susnux

Copy link
Copy Markdown
Contributor

Hello 👋
currently here have been no activity in the last years.
If this is still actual feel free to reopen the pull request and resolve the conflicts so we can incorporate it into Nextcloud.
Thank you very much for your contribution!

@susnuxsusnux closed this Jun 9, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progresscommunitypull requests from communityfeature: caldavRelated to CalDAV internalsperformance 🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@tcitworld@susnux@github-advanced-security@joshtrichards@blizzz@skjnldsv@nextcloud-bot