Skip to content

Let users delete rules from protected environments

What does this MR do and why?

Only deployer rules for now, as approval rules come later.

The API is very explicit about only accepting one of group_id, user_id, or access_level (even if the others are set to null), so we need to filter out and find only properties that have a truthy value.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Enable the feature flag:
Feature.enable(:multiple_environment_approval_rules_fe)
  1. Navigate to a project's environments page Deployments > Environments
  2. Add an environment
  3. Navigate to the CI/CD settings page Settings > CI/CD
  4. Protect the environment
  5. View the protected environment
  6. delete a rule

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

For #378446 (closed), part of !109157 (closed)

Merge request reports