Merge request widget incorrectly shows code owner is eligible to approve an MR
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
If a code owner has Reporter
permissions or lower on a project, they are shown as an eligible approver. They aren't able to approve the merge request (which is expected), but why are they showing as an eligible approver?
Steps to reproduce
- Add a code owners file to an existing project targeting
/path/to/stuff @<username>
- Add the user as a member to the project and give them the
Reporter
role - Make a change within
/path/to/stuff
and create an MR - In the merge request, the user with the
Reporter
role is shown as an eligible approver in the MR approvals widget. - If you sign in as the user in question, they can see themselves as an eligible approver in the MR approvals widget, but the
Approve
button is missing (that is expected)
Do note the same issue occurs if you add a group as a member to the project.
Example Project
N/A
What is the current bug behavior?
Code owners that aren't eligible to approve an MR are appearing as such in the merge request widget
What is the expected correct behavior?
Code owners that aren't eligible to approve an MR should not appear as such in the merge request widget
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)