Fix incorrect `locked` state for missing group settings
What does this MR do and why?
Contributes to #441089 (closed)
Problem
When user visits approval settings the first time, it seems that all settings are available for the change. However, after saving them the user start seeing restrictions from the instance level.
It happens because the missing GroupMergeRequestApprovalSetting
is
treated like the group is missing.
Solution
Correctly set locked
state for missing settings case.
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.
Before | After |
---|---|
How to set up and validate locally
- Configure Merge Request Approval Settings at instance level
- Visit a group without Merge Request Approval Settings
- You should see that instance level values are visually locked
- Without the fix, they will appear active before you save the form.
Edited by Vasilii Iakliushin