-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove memberships when deleting tenant or project #94
Conversation
pkg/service/project.go
Outdated
return nil, err | ||
} | ||
for _, m := range memberships { | ||
err := s.projectMemberStore.Delete(ctx, m.Meta.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to just delete these member through a single SQL query? I guess it's more robust than a loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires a additional Store Interface DeleteAll
or so ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know how difficult this is. Maybe we can return "Unimplemented" for project and tenant and just implement for the member stores?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have i implementation, unsure if this should be pushed to this PR or create a new one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…ta-api into cleanup-memberships
Is it necessary to delete project members when a tenant is deleted? I thought such cases should never occur, since it's not permitted to delete a tenant who still has projects. |
This is correct, my bad, but should not hurt |
This reverts commit 03e485d.
No description provided.