Skip to content

Fix put endpoint rules for protected environments

What does this MR do and why?

This MR fixes #428882 (closed) by adding the same requirements to PUT endpoint of protected environments, as other endpoints have.

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.

Before After

How to set up and validate locally

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

  1. Navigate to Project -> Operate -> Environments
  2. Create an environments with a dot in the name
  3. Navigate to Project -> Settings -> CI/CD
  4. Expand Protected Environments collapsible and add a deployment rule, for example assign it to a group
  5. Try to add another deployment rule, this time adding a user. You should be able to change the environment

Merge request reports