fix(group): Deletion of groups handle correctly#2256
Merged
Conversation
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
jiparis
reviewed
Jul 15, 2025
| membership.MemberID(groupID), | ||
| membership.And( | ||
| membership.ResourceID(groupID), | ||
| membership.ResourceTypeEQ(authz.ResourceTypeGroup), |
Member
There was a problem hiding this comment.
is this possible? a membership with type = group? Group memberships have their own table, right?
Member
There was a problem hiding this comment.
replying myself, the maintainer role is stored here, thanks!
jiparis
approved these changes
Jul 15, 2025
jiparis
left a comment
Member
There was a problem hiding this comment.
Thanks.
As a side note, not for now, I would remove completely the deleted_at from group_membership table, as we don't have it in other "membership" tables.
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.
This patch fixes issues with group removal, where related resources were being left behind. Deleting a group now performs the following actions:
It also creates a migration that fixes all current dangling groups if any in the system by performing the same steps as above.