-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(caldav): Add sharee to address list when calendar is shared #45054
base: master
Are you sure you want to change the base?
Conversation
Setting to draft because we have to test this locally before it's integrated. We do not want to experiment with this on production instances |
Agreed. |
Test scenario
Case 1Steps:
Expected outcome:
Case 2Steps:
Expected outcome:
|
b1610cc
to
d9113c8
Compare
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
a8b4ad7
to
83f6266
Compare
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
|
||
$calendarNode = $this->server->tree->getNodeForPath($calendarPath); | ||
|
||
$addresses = $this->getAddressesForPrincipal($calendarNode->getOwner()); |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
|
||
$addresses = $this->getAddressesForPrincipal($calendarNode->getOwner()); | ||
// determain if this is a shared calendar | ||
if ($calendarNode->isShared()) { |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
if ($calendarNode->isShared()) { | ||
$addresses = array_merge( | ||
$addresses, | ||
$this->getAddressesForPrincipal($calendarNode->getPrincipalURI()) |
Check failure
Code scanning / Psalm
UndefinedInterfaceMethod Error
|
||
if (!$isNew) { | ||
$node = $this->server->tree->getNodeForPath($request->getPath()); | ||
$oldObj = Reader::read($node->get()); |
Check notice
Code scanning / Psalm
UndefinedInterfaceMethod Note
$oldObj = null; | ||
} | ||
|
||
$this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified); |
Check notice
Code scanning / Psalm
ArgumentTypeCoercion Note
Disregard... Initial comment... The better solution is to supply both the Sharer and Sharee addresses to the iTipBroker... This keeps the calendar owner logic sounds and in tacked and fixes the reason the iTipBroker does not generate proper messages when a Sharee creates an event with attendees in the Sharers calendar. |
Additional thoughts... Some front end UI changes that would be beneficial...
Some back end changes that would be beneficial...
Draw backs...
|
Summary
Sabre invitation plugin skip invites if the organizer of the event is not the owner of the calendar. That happens for shared calendars because \OCA\DAV\CalDAV\Calendar::getOwner overwrites \Sabre\CalDAV\Calendar::getOwner. Upstream returns the principaluri of the owner, we return the principaluri of the sharee.
Want to test if this revives the invites in shared calendars. Adjustments for other places that use the getOwner method might be required.