Skip to content

Fix unchecking all compliance frameworks on MR approvals settings

Tan Le requested to merge tancnle/fix-unset-all-compliance-frameworks into master

What does this MR do?

This MR fixes a bug where administrator can't uncheck all compliance frameworks for Merge request approvals settings under Admin area.

  • Include hidden field on Rails form to notice when there is no selection
  • Remove empty string value "" before validation and save
  • Add more functional test coverage

Steps to reproduce

  • Navigate to Admin Area > Push Rules
  • Open Merge request approvals section
  • Uncheck all compliance framework checkboxes
  • Click Save changes
  • The values are reverted back to original values

Screenshots

Screen_Shot_2020-08-21_at_4.02.26_pm

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tan Le

Merge request reports