Skip to content

Destroy user_project_member_roles when a project_group_link is destroyed

What does this MR do and why?

When a ProjectGroupLink is destroyed run a background job to destroy all user_project_member_roles records where project_id = link.project and shared_with_group_id = link.group_id. This destroys all user_project_member_roles records of all members of link.group_id created when the group was invited to the project.

Database changes

::Authz::UserProjectMemberRole.in_project_shared_with_group(shared_project, shared_with_group).delete_all

EXPLAIN: https://console.postgres.ai/shared/363685cf-b35d-44b2-b7c3-41b5e4b23a1f

References

Destroy user_project_member_roles when project_... (#571087 - closed)

Screenshots or screen recordings

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports

Loading