Custom MR approval rule does not work with subgroups
Summary
Creating a new approval rule specifying only the parent group does not allow members of subgroups to approve, regardless of their role.
Split from: #389374 (comment 1329358902) as per @abdwdd request.
Steps to reproduce
Create the following setup:
- Create
group/subgroupcontaining user Alice with Developer role - Inside
groupmembers, invitesubgroupwith Developer role as max level (note that Alice is part ofgrouponly throughsubgroup) - Create
projectinsidegroup - In the
projectsettings, create a custom approval rule withgroup(notsubgroup!) constituting the approval list
Example Project
However note that Gitlab Premium is needed for Merge Request Approval rules, and this was created on a free account.
What is the current bug behavior?
The user part of the subgroup will not be able to approve the MR unless he is a direct member of group too.
What is the expected correct behavior?
The user part of the subgroup will be able to approve the MR via the custom approval rule.
Relevant logs and/or screenshots
Workaround
Add subgroup explicitly to Approval Rule
Edited by Jay McCure
