Skip to content

Update when default checkbox shows

What does this MR do and why?

Update when default default checkbox shows

  • hide checkbox for spp policies that have policy_scope on them
  • update tests

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.

Scenario Screenshot
existing policy - no scope existing_policy_-_no_scope
existing policy - scope existing_policy_-_scope

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable Feature Flags
echo "Feature.enable(:security_policies_policy_scope) && Feature.enable(:security_policies_policy_scope_project)" | gdk rails c
  1. Navigate to a group => Settings --> General --> Permissions and group features section
  2. Enable Security policy scope
  3. Go to project in the group --> Secure --> Policies --> New Policy --> Result or Execution policy
  4. Verify the policy scope section appears without the checkbox
  5. Save the policy without the policy_scope property
  6. Navigate back to the project in the group --> Secure --> Policies
  7. Select the policy you just created and click "Edit policy"
  8. Verify the policy scope section has the check box for the default policy scope
  9. Add a policy scope to it
  10. Save the policy without the policy_scope property
  11. Navigate back to the project in the group --> Secure --> Policies
  12. Select the policy you just created and click "Edit policy"
  13. Verify the policy scope section appears without the checkbox

Related to #441520 (closed)

Merge request reports