Scope invited group member roles to the correct shared group

What does this MR do and why?

Fix shared_members_with_member_role to scope invited group member roles to the correct shared group. The current join to user_group_member_roles matched only on the user and the invited group, so a member role granted by one link was returned for every other group the same invited group was shared into.

References

Screenshots or screen recordings

Before After
image.png Screenshot 2026-09-13 at 6.15.27 PM.png

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.

Related to #628870 (closed)

Merge request reports

Loading
Loading