Skip to content
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

fix(FederatedShareProvider): Delete external shares when groups are deleted or users removed from a group #51000

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

provokateurin
Copy link
Member

@provokateurin provokateurin commented Feb 24, 2025

Fixes #35159
Fixes #50289

Summary

  1. The FederatedShareProvider never implemented cleaning up shares when a group was deleted or a user was removed from a group.
  2. The related hooks that are supposed to do the cleanup weren't working: Remove old OC_Hook for OC_Group events #24041. While the PR removed the hooks, I'm not certain that it is the source of the problem because I believe the cleanup was still working a few months ago.

Checklist

@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Feb 24, 2025
@provokateurin provokateurin added this to the Nextcloud 32 milestone Feb 24, 2025
@provokateurin provokateurin requested review from ArtificialOwl, kyteinsky, come-nc, a team and icewind1991 and removed request for a team February 24, 2025 12:40
@provokateurin
Copy link
Member Author

/backport to stable31

@provokateurin
Copy link
Member Author

/backport to stable30

@provokateurin
Copy link
Member Author

/backport to stable29

Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

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

thanks for the nice work!
a small related issue is that users added back/freshly added to the target remote share group do not have gain access to the share. Maybe we can throw in a user-added event here too?

@provokateurin
Copy link
Member Author

Will add a behat test for the event listeners to ensure it works and doesn't break again.

@provokateurin provokateurin marked this pull request as draft February 25, 2025 16:04
@provokateurin provokateurin added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Feb 25, 2025
@provokateurin
Copy link
Member Author

a small related issue is that users added back/freshly added to the target remote share group do not have gain access to the share. Maybe we can throw in a user-added event here too?

I noticed this as well, can you open an issue about it? I'm not sure how much work it will be and I don't think it's small enough to get it done in this PR.

@kyteinsky
Copy link
Contributor

sounds good

@provokateurin provokateurin force-pushed the fix/federatedfilesharing/group-cleanup branch from 9714d53 to f5b5aec Compare March 3, 2025 11:50
@provokateurin provokateurin marked this pull request as ready for review March 3, 2025 11:50
@provokateurin provokateurin requested a review from kyteinsky March 3, 2025 11:50
Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

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

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug
Projects
None yet
4 participants