Skip to content

Fix user, group and circles change handling in bookmark folder shares - #2570

Merged
marcelklehr merged 25 commits into
masterfrom
test/sharing-complexities
Oct 8, 2026
Merged

marcelklehr merged 25 commits into
masterfrom
test/sharing-complexities

Conversation

@marcelklehr

@marcelklehr marcelklehr commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

fixes #2569

fixes #2484

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Fixes:
- Listeners never ran: removed the leading backslash from the three circles registrations in Application.php.
- Member branch never matched: the listener now checks CircleMemberAddedEvent and CircleMemberRemovedEvent directly, instead of their supposed parent class CircleMemberGenericEvent.
- Member types read as share types: a circle is now resolved straight to its local users. A new CirclesService::getUserIdsOfCircle() uses getInheritedMembers() and keeps only user members, so groups and nested circles are already flattened. Share creation in FolderService and the listener both use it.
- Broken upward propagation: removed the code that built fake events. The listener now collects the affected circles itself: the circle the event is about, plus everything above it via a new CirclesService::getParentCircleIds() (from getMemberships() → getCircleId()). It then updates every circle share on those circles.
- The member that was added or removed is resolved by type:
  - a user is that user,
  - a group is the group's users,
  - a circle is resolved by its single id, not by userId, which is its display name.
- Removing a user who is still in the circle another way: on removal, a user only loses the folder if they're no longer anywhere in that circle (directly, through a group, or through a nested circle).
- Minor: the CircleDestroyedEvent handler now also catches the DB Exception.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
groups inside circles are now handled

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
… still remove their folder even if a circle share also covers them

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…ave is now removed, including ones from circle shares

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…it through a group or circle no longer gives them a second SharedFolder

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
… gets the combined permissions of all of them

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…ger crashes

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…from members who are still covered by another share of it

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr changed the title test(UserGroupsCirclesListener): Test user and group changes Fix user, group and circles changes in bookmark folder shares Oct 5, 2026
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
marcelklehr force-pushed the test/sharing-complexities branch from 00776eb to 811f36d Compare October 5, 2026 14:59
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
marcelklehr force-pushed the test/sharing-complexities branch from 1d573d9 to 05a5d40 Compare October 5, 2026 16:42
@marcelklehr marcelklehr changed the title Fix user, group and circles changes in bookmark folder shares Fix user, group and circles change handling in bookmark folder shares Oct 5, 2026
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…WithUser

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…ed again

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…overs them

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…g shares

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
marcelklehr enabled auto-merge October 8, 2026 17:55
@marcelklehr
marcelklehr disabled auto-merge October 8, 2026 18:29
@marcelklehr
marcelklehr merged commit 14fa746 into master Oct 8, 2026
61 checks passed
@marcelklehr
marcelklehr deleted the test/sharing-complexities branch October 8, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant