Group not visible in invite dropdown
Summary
Let's assume we have the structure Group-A/Subgroup-A and Group-B, and Group-A is shared with Group-B having the Developer role.
If Subgroup-A is directly shared with Group-B using a role lower than Developer, e.g. Reporter, the following happens with Subgroup-A.
The issue is, if we want to change the direct membership from Reporter to Maintainer it is not possible because:
- The UI doesn't show Group-B in the invitation dropdown, because it is already shared with it directly.
- The UI doesn't show the direct membership, so we can't remove it.
This blocks the user from changing the direct membership using the UI. This situation can be easily encountered if the user does not change by mistake the default Guest role.
Screen_Recording_2023-07-12_at_14.48.47
Comparing to how the user membership works, this scenario is not possible there because we get an error message when trying to add a direct member with a lower role than the one inherited from the upstream group.
Steps to reproduce
- Create
Group-A/Subgroup-AandGroup-B - Share
Group-AwithGroup-Busing theDeveloperrole - Share
Subgroup-AwithGroup-Busing theReporterrole - Notice that the UI shows
Subgroup-Aas being shared withGroup-Bvia theGroup-Ainheritance with theDeveloperrole - Try to share again
Subgroup-AwithGroup-Band notice thatGroup-Bis not in the available groups any more
This bug happens on GitLab.com
What is the current bug behavior?
What is the expected correct behavior?
For consistency, we should return an error message when trying to share a group with lower than inherited permissions.
Alternativelly, the group being shared with should still be vizible in the UI. This would allow the user to change the access level in case it was mistakenly set too low.
