Limit editing of approval rules in Branch rule details
What does this MR do and why?
The read-only component has been already removed, because it was no longer in use ( !152971 (be85b95d)). So I thought that instead of hiding the whole section, we can limit the available editing and bind it to the edit_branch_rules
feature flag.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
edit_branch_rules | Before | After |
---|---|---|
disabled | ||
disabled | ||
enabled | ||
enabled |
How to set up and validate locally
- Set
Feature.disable(:edit_branch_rules)
- Go to Settings / Repository and expand Branch rules section.
- Choose a branch rule from the table and go to View details
- Merge request approvals section should not have controls for adding or editing the rules.
- Go to Settings / Merge requests and scroll to Merge request approvals section.
- You should be able to still edit and add new rules.
Numbered steps to set up and validate the change are strongly suggested.
Related to: #466705 (closed)
Edited by Paulina Sedlak-Jakubowska