Skip to content

Fix query in User#authorized_groups

Heinrich Lee Yu requested to merge 461528-fix-authorized-groups into master

What does this MR do and why?

Child project members of an invited group are not given access to the inviting group. Only direct members are given access.

So these records should not be included in User#authorized_groups.

Old query: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/28284/commands/88295

New query: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/28284/commands/88292

MR acceptance checklist

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

How to set up and validate locally

  1. Create a private group named private-group
  2. Create another private group named invited-group
  3. Create a project named invited-group-project under invited-group
  4. Add a user as a member of invited-group-project
  5. Add invited-group as a member of private-group.

As the user, visit /dashboard/groups and you should not see private-group in the list.

Related to #461528

Edited by Heinrich Lee Yu

Merge request reports