Inherited members of Code Owners subgroups cannot view approvers in merge requests
Summary
Merge request submitters that have inherited permissions to the group that is being used as the Code Owners group are unable to see who on their merge request is able to approve it as a Code Owner.
Steps to reproduce
- Configure a group and project structure similar to the following:
graph LR;
A[Group]-->B[Subgroup 1];
B-->C[Subgroup 2];
A-->D[Project];
Note: Subgroup 2 contains directly added members that serve as the Code Owners while Project contains the CODEOWNERS
file and is where merge requests are being opened.
- Within Project add a
CODEOWNERS
file that specifies thegroup/subgroup1/subgroup2
group as the Code Owners for any files of your choosing within the project. - Within Project, configure protected branches to require Code Owner approval.
- Share access to
Subgroup 2
- Have a user (User A) that has inherited access to
Subgroup 2
open a merge request withinProject
. - Have
User A
observe that they cannot see who the Code Owners are on the merge request and have a different user (User B) who has been directly added toSubgroup 2
observe that they can see that they, and others, are Code Owners on the merge request.
Example Project
Group -> Subgroup 1 -> Subgroup 2 -> Project
What is the current bug behavior?
The MR submitter is unable to view who the Code Owners are on a merge request.
What is the expected correct behavior?
The MR submitter is able to view who the Code Owners are on a merge request.
Relevant logs and/or screenshots
MR from the perspective of the submitter:
MR from the perspective of the Code Owner:
Output of checks
This bug happens on GitLab.com: 13.6.0-pre ea48c52f482
Zendesk Reports (GitLab Internal)
- https://gitlab.zendesk.com/agent/tickets/179871
- https://gitlab.zendesk.com/agent/tickets/185574
- https://gitlab.zendesk.com/agent/tickets/190384
- https://gitlab.zendesk.com/agent/tickets/190802
- https://gitlab.zendesk.com/agent/tickets/190494
Workaround
This issue can be worked around by having the MR submitter Edit
the MR, which will display the names of the specific Code Owners applicable to the MR in the approvals section.