MR approvals section on Branch rule details possible to edit
Summary
When introducing MR approval rules section to Branch rule details page, we did not hide it behind the feature flag, since it was going to replace the previously read-only section.
After that the read-only component has been removed, because it was no longer in use (!152971 (be85b95d)).
Since then, we have also identified a bug, when creating an approval rule: Creating new MR approval rules in Branch rule details duplicates a component.
Steps to reproduce
- On gitlab.com (or GDK with
edit_branch_rules
feature flag disabled), open a project. - Go to Settings / Repository and expand Branch rules section.
- Choose a branch rule from the table and go to View details
- Edit All eligible users rule in Merge request approvals section. An empty rule row will duplicate. If you try to edit the duplicated one, you will get a 400 error response.
Example Project
Any project.
What is the current bug behavior?
The rule is created, but upon creation, the component is rendered again.
The editing should not be possible and should be bound to the edit_branch_rules
feature flag.
What is the expected correct behavior?
MR approval rules section is in read-only mode. No editing is possible, when the feature flag is disabled.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
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)