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.
/cc @bufferoverflow
Relates to: #219230
Screenshots
Group members of sub group:
Before MR | After MR |
---|---|
Filter for direct or inherited memberships:
All memberships | Direct memberships | Inherited memberships | |
---|---|---|---|
Direct membership of linux group has higher max role |
|||
Inherited membership of linux group has higher max role |
How to set up and validate locally
- Create
Top Group
group andUser Group
group. - Add
User Group
group as direct member toTop Group
group withMax role: Developer
. - Create
Sub Group
group as sub group ofTop Group
group. - Visit
Group members
page ofSub Group
group and openGroups
tab (http://localhost:3000/groups/top-group/sub-group/-/group_members?tab=groups). - The inherited
User Group
group is included in the list. - Add
User Group
group as direct member toSub Group
group withMax role: Maintainer
. - 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). - 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.
-
I have evaluated the MR acceptance checklist for this MR.