Skip to content

send invitations for shared calendars - #9609

Merged
MorrisJobke merged 1 commit into
masterfrom
bugfix/3830/invitations_for_shared_calendars
Jun 1, 2018
Merged

send invitations for shared calendars#9609
MorrisJobke merged 1 commit into
masterfrom
bugfix/3830/invitations_for_shared_calendars

Conversation

@georgehrke

@georgehrkegeorgehrke commented May 25, 2018

Copy link
Copy Markdown
Member

fixes#3830

@georgehrkegeorgehrke added the 2. developing Work in progress label May 25, 2018
@georgehrkegeorgehrke added this to the Nextcloud 13.0.3 milestone May 25, 2018
@georgehrke
georgehrkeforce-pushed the bugfix/3830/invitations_for_shared_calendars branch from 17fdafd to 95165f9CompareMay 25, 2018 17:19
@georgehrke

Copy link
Copy Markdown
MemberAuthor

note to myself: Can this solution cause issues with infinite invitation loops? Should the address list only be limited to the current user accessing it and not to all users possibly having access to it?

@georgehrke

Copy link
Copy Markdown
MemberAuthor

Can this solution cause issues with infinite invitation loops?

Possibly

Should the address list only be limited to the current user accessing it and not to all users possibly having access to it?

Yes, just replace $calendarNode->getOwner() with $calendarNode->getPrincipalURI()

@georgehrke

Copy link
Copy Markdown
MemberAuthor

Saved this patch as a gist because I might need the Principal changes for future work: https://gist.github.com/georgehrke/ce704d4370b8e9d60231f2ea35d15f0c

@georgehrke
georgehrkeforce-pushed the bugfix/3830/invitations_for_shared_calendars branch from 95165f9 to b11a043CompareMay 25, 2018 18:28
@codecov

codecovBot commented May 25, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9609 into master will decrease coverage by 49.08%.
The diff coverage is 0%.

@@ Coverage Diff @@## master #9609 +/- ##
============================================
- Coverage 51.15% 2.07% -49.09% - Complexity 25692 25697 +5 
============================================
Files 1568 1568 Lines 88039 88052 +13 ============================================
- Hits 45036 1824 -43212 - Misses 43003 86228 +43225
Impacted FilesCoverage ΔComplexity Δ
apps/dav/lib/CalDAV/Schedule/Plugin.php0% <0%> (-32%)17 <5> (+5)
lib/private/Cache/CappedMemoryCache.php0% <0%> (-100%)15% <0%> (ø)
lib/private/Security/CSRF/CsrfTokenManager.php0% <0%> (-100%)8% <0%> (ø)
lib/private/Notification/Action.php0% <0%> (-100%)24% <0%> (ø)
lib/private/Remote/Credentials.php0% <0%> (-100%)3% <0%> (ø)
apps/user_ldap/lib/Migration/UUIDFixGroup.php0% <0%> (-100%)1% <0%> (ø)
apps/dav/lib/CalDAV/PublicCalendarObject.php0% <0%> (-100%)1% <0%> (ø)
lib/private/Files/Search/SearchQuery.php0% <0%> (-100%)6% <0%> (ø)
...lib/Middleware/Exceptions/NotSubAdminException.php0% <0%> (-100%)1% <0%> (ø)
core/Controller/NavigationController.php0% <0%> (-100%)14% <0%> (ø)
... and 879 more

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
@georgehrke
georgehrkeforce-pushed the bugfix/3830/invitations_for_shared_calendars branch from b11a043 to a9c313cCompareMay 25, 2018 18:42
@georgehrkegeorgehrke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 25, 2018
@georgehrke

Copy link
Copy Markdown
MemberAuthor

In contrast to the previous patch this doesn't check whether the current user is a rw-share, but then a person with a ro-share should not be able to update calendar objects and trigger the calendarObjectChange method anyway.

@georgehrkegeorgehrke changed the title WIP: send invitations for shared calendarssend invitations for shared calendarsMay 25, 2018
@MorrisJobke
MorrisJobke requested a review from rullzerMay 30, 2018 09:54
$oldObj = null;
}

$this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if new participant addresses don't have an e-mail set does this do 💥 ?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is properly handled by processICalendarChange.

As I said in the methods comment, this is basically just a copy of parent:: calendarObjectChange, i just replaced line 133. That's why I also didn't write tests 🙈

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough!

@rullzer

Copy link
Copy Markdown
Member

Tests would be appreciated as this is something we might else easily break in the future

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit f5e16df into masterJun 1, 2018
@MorrisJobke
MorrisJobke deleted the bugfix/3830/invitations_for_shared_calendars branch June 1, 2018 10:40
@MorrisJobke

Copy link
Copy Markdown
Member

Reverted in #15676

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No calendar invitation send for event in shared calendars

3 participants

@georgehrke@rullzer@MorrisJobke