[stable30] Introduce own method for calendar unsharing#52961
Merged
AndyScherzinger merged 2 commits intostable30from Jun 1, 2025
Merged
[stable30] Introduce own method for calendar unsharing#52961AndyScherzinger merged 2 commits intostable30from
AndyScherzinger merged 2 commits intostable30from
Conversation
63de4c7 to
3d05796
Compare
Contributor
Autoloader |
| } | ||
|
|
||
| $principal = $this->principal->getPrincipalByPath('principals/users/' . $user); | ||
| if ($principal === null) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction Note
| } | ||
|
|
||
| $principal = $this->principal->getPrincipalByPath('principals/users/' . $user); | ||
| if ($principal === null) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction Note
| return true; | ||
| } | ||
|
|
||
| private function hasAccessByGroupOrCirclesMembership(int $resourceId, string $principal) { |
Check notice
Code scanning / Psalm
MissingReturnType Note
9cabbc2 to
1fbcfff
Compare
ChristophWurst
approved these changes
May 20, 2025
st3iny
approved these changes
Jun 1, 2025
Member
|
Conflicts 👀 |
1fbcfff to
e713c74
Compare
Contributor
|
Resolved ;) Was conflicting with my own pr #52995 🙈 |
- Introduces a `unshare` method in `CalDavBackend` to handle user unshares. - Implements check to determine if unshare entry is needed based on group/circle membership. - Ensures `updateShares` is only used when the calendar owner manages shares. - Resolves issue where unsharing a calendar as owner created an unshare entry in `oc_dav_shares`. Related PRs: - #43117 - #47737 Signed-off-by: Daniel Kesselberg <[email protected]>
Before: Find all entries in `dav_shares` with `access = 5` for the user's principal, as well as group and circle memberships. After: Find all entries in `dav_shares` with `access = 5` solely for the user's principal. Future support for unsharing group or circle principals could be considered as a feature enhancement. Signed-off-by: Daniel Kesselberg <[email protected]>
e713c74 to
4c13ef7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #52046
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.