Return allow_force_push: false always when security policy enforced
What does this MR do and why?
This MR fixes API inconsistency where allow_force_push should return false when security policy is enforced.
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.
How to set up and validate locally
- Create a protected branch and enable
allow force push
- Create a security policy with
prevent_pushing_and_force_pushing: true
for the protected branch - View the protected branch in the UI
- View the protected branch information from the API
- Both should return information that force_push is not possible
Related to #436075 (closed)