-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable30] Introduce own method for calendar unsharing #52961
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
Conversation
63de4c7 to
3d05796
Compare
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
|
Conflicts 👀 |
1fbcfff to
e713c74
Compare
|
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
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.