Only administrators can override approval rules in MRs
Summary
The following discussion from !141253 (merged) should be addressed:
-
@msedlakjakubowski started a discussion: (+8 comments)
🌱 This needs verification. Previously it only linked to https://docs.gitlab.com/ee/user/permissions.html but it only has an entry for "Merge requests: Manage merge approval rules (project settings)", and Maintainer role might not be enough. -
I've confirmed that maintainer role isn't enough, even owner role isn't enough.
I believe this logic is actually happening in the frontend.
This file renders an element which we hook into with Vue
- app/views/shared/issuable/_approver_suggestion.haml
- app/assets/javascripts/pages/projects/merge_requests/shared/init_form.js
I'm finding it hard to understand how the Vue logic works. Could you find a frontend dev to look into this?
Steps to reproduce
- When creating a new merge request, scroll to the Approval Rules section, and add or remove your desired approval rules before selecting Create merge request.
- When viewing an existing merge request:
-
Select Edit.
-
Scroll to the Approval Rules section.
-
Add or remove your desired approval rules. The buttons don't show unless you're an administrator.
-
Select Save changes.
-
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Feature should be accessible to users with lower roles, for example, Maintainers.
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)
Possible fixes
When this is fixed, update the prerequisites in https://docs.gitlab.com/ee/user/project/merge_requests/approvals/rules.html#edit-or-override-merge-request-approval-rules.