- Issues
- ISSUE-503
Merge request approval settings are not compliant
Control:CTRL-503MR approval settings must be compliant
📋 What is this?
The project's merge request approval settings do not meet the expectations you configured. Each expectation is optional: a setting you leave unset is not checked.
⚠️ Impact
Approval settings apply above every approval rule. When authors or committers can approve, when rules can be overridden inside a merge request, or when approvals survive new commits, the review requirement can be satisfied without anyone reviewing the code that actually ships.
🔧 How to fix
Update the project's approval settings under Settings > Merge requests to match the expectations in your configuration.
# GitLab project settings - ❌ Approval settings violate the policy# Settings > Merge requests > Approvals:## Prevent approval by author: false ← Author can approve own MR# Prevent approvals by users who add commits: false# Remove all approvals when commits are added: false## These settings allow the MR author to approve their own changes,# and approvals remain valid even after new commits are pushed.# GitLab project settings - ✅ Approval settings match the policy# Settings > Merge requests > Approvals:## Prevent approval by author: true# Prevent approvals by users who add commits: true# Remove all approvals when commits are added: true💡 Tips
- Merge request approval settings require GitLab Premium or Ultimate. On Free the API returns defaults rather than an error, so the control cannot tell the tier apart from a genuinely unlocked project. It ships disabled for that reason. Enable it only on Premium or Ultimate projects.
- Each expectation is optional:
preventApprovalByAuthor,preventApprovalsByCommitters,preventEditingApprovalRulesInMRandrequireReAuthToApproveare only checked when set totrue. behaviorWhenCommitIsAddedis a minimum on the ladderkeep_approvals<remove_approvals_by_code_owners<remove_all_approvals, so a stricter project than you asked for still passes.- Enable 'Prevent approval by author' to ensure code is reviewed by someone other than the author.
- These settings can also be enforced at the group level for consistency.
⚙️ Configure this control
On the Plumber Platform: open the Policies page and set control CTRL-503 on the policy that governs the project.
With the CLI alone: set it in your configuration file. Every field and default is in the controls configuration reference, CTRL-503.