Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented May 19, 2025

Backport of #52046

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot requested review from ChristophWurst and kesselb May 19, 2025 14:12
@backportbot backportbot bot added bug 3. to review Waiting for reviews labels May 19, 2025
@backportbot backportbot bot added this to the Nextcloud 30.0.12 milestone May 19, 2025
@solracsf solracsf changed the title [stable30] [stable31] Introduce own method for calendar unsharing [stable30] Introduce own method for calendar unsharing May 20, 2025
@kesselb kesselb self-assigned this May 20, 2025
@kesselb kesselb force-pushed the backport/52808/stable30 branch from 63de4c7 to 3d05796 Compare May 20, 2025 10:40
@kesselb
Copy link
Contributor

kesselb commented May 20, 2025

Review and resolve any conflicts

Autoloader

}

$principal = $this->principal->getPrincipalByPath('principals/users/' . $user);
if ($principal === null) {

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

array<array-key, mixed> does not contain null
}

$principal = $this->principal->getPrincipalByPath('principals/users/' . $user);
if ($principal === null) {

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

array<array-key, mixed> does not contain null
return true;
}

private function hasAccessByGroupOrCirclesMembership(int $resourceId, string $principal) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\DAV\DAV\Sharing\Backend::hasAccessByGroupOrCirclesMembership does not have a return type, expecting bool
@kesselb kesselb force-pushed the backport/52808/stable30 branch 3 times, most recently from 9cabbc2 to 1fbcfff Compare May 20, 2025 11:15
@kesselb kesselb marked this pull request as ready for review May 20, 2025 11:46
@st3iny
Copy link
Member

st3iny commented Jun 1, 2025

Conflicts 👀

@kesselb kesselb force-pushed the backport/52808/stable30 branch from 1fbcfff to e713c74 Compare June 1, 2025 14:36
@kesselb
Copy link
Contributor

kesselb commented Jun 1, 2025

Resolved ;)

Was conflicting with my own pr #52995 🙈

kesselb added 2 commits June 1, 2025 16:39
- 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]>
@kesselb kesselb force-pushed the backport/52808/stable30 branch from e713c74 to 4c13ef7 Compare June 1, 2025 14:39
@AndyScherzinger AndyScherzinger merged commit f2ff14e into stable30 Jun 1, 2025
183 of 192 checks passed
@AndyScherzinger AndyScherzinger deleted the backport/52808/stable30 branch June 1, 2025 18:12
@nextcloud-bot nextcloud-bot mentioned this pull request Jun 4, 2025
11 tasks
@nextcloud-bot nextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzz blizzz mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants