Groups dashboard displays incorrect groups

In Route minimal access user to groups dashboard (!172226 - merged) we fixed a common scenario where a user with minimal access to a root group is redirected to their group dashboard after SSO login.

The group dashboard:

  1. Shows a link to the root group, which the user doesn't have access to. Clicking through leads to a 404.
  2. Does not show a sub-group which the user does have access to with owner rights as a direct member.

I am an owner of sub-group A and this group is shared into sub-group B. Both sub-group A and sub-group B are children of gitlab-org where I have minimal access membership.

minimal access in root group gitlab-org:

Screenshot_2024-11-26_at_1.47.50_PM

Owner of sub-group A:

Screenshot_2024-11-26_at_1.44.27_PM

Owner via shared group into sub-group B:

Screenshot_2024-11-26_at_1.44.37_PM

But group dashboard displays the wrong groups:

Screenshot_2024-11-26_at_1.55.02_PM

Edited by Alex Pooley