Skip to content

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

  1. 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.

  1. Within Project add a CODEOWNERS file that specifies the group/subgroup1/subgroup2 group as the Code Owners for any files of your choosing within the project.
  2. Within Project, configure protected branches to require Code Owner approval.
  3. Share access to Subgroup 2
  4. Have a user (User A) that has inherited access to Subgroup 2 open a merge request within Project.
  5. 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 to Subgroup 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:

Screenshot_2020-11-10_Update_main_go___1____Merge_Requests___179871_level_1_

MR from the perspective of the Code Owner:

Screenshot_2020-11-10_Update_main_go___1____Merge_Requests___179871_level

Output of checks

This bug happens on GitLab.com: 13.6.0-pre ea48c52f482

Zendesk Reports (GitLab Internal)

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.

Edited by Tristan