Skip to content

Group members: include inherited group links on group members page

What does this MR do and why?

On the group members page of a group (/groups/<group_name>/-/group_members, there are several tabs, including 'Members' and 'Groups'.

The 'Members' tab displays all users who have a direct or inherited membership for the corresponding group. If a user has multiple (inherited) memberships for that group, the one with the highest permission is displayed. In the search bar you can also filter to show only the direct or only the inherited memberships.

In the 'Groups' tab, it looks completely different. Only those groups are displayed which have a direct membership for the corresponding group. This is very annoying, because important membership information remains hidden for the maintainer of the group.

Therefore, this MR adapts the 'Groups' tab to the 'Members' tab: It displays all groups that have a direct or inherited membership for the corresponding group. If a group has multiple (inherited) memberships for that group, the one with the highest permission is displayed. In the search bar you can also filter to show only the direct or only the inherited memberships.

🛠 with at Siemens

/cc @bufferoverflow

Relates to: #219230

Screenshots

Group members of sub group:

Before MR After MR
image image

Filter for direct or inherited memberships:

All memberships Direct memberships Inherited memberships
Direct membership of linux group has higher max role image image image
Inherited membership of linux group has higher max role image image image

How to set up and validate locally

  1. Create Top Group group and User Group group.
  2. Add User Group group as direct member to Top Group group with Max role: Developer.
  3. Create Sub Group group as sub group of Top Group group.
  4. Visit Group members page of Sub Group group and open Groups tab (http://localhost:3000/groups/top-group/sub-group/-/group_members?tab=groups).
  5. The inherited User Group group is included in the list.
  6. Add User Group group as direct member to Sub Group group with Max role: Maintainer.
  7. The User Group group is shown as direct member because the access level of the direct membership (Maintainer) is higher than the access level of the inherited membership (Developer).
  8. Try the Membership filter in the filter bar to only show direct or inherited members.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hannah Sutor

Merge request reports