WIP: Resolve "Protected environments"
What does this MR do?
It includes another section for "Protected Environments"
Are there points in the code the reviewer needs to double check?
- Architectural review
Why was this MR needed?
Environments can be used for different scopes, so some of them are just for testing while others are for production. As deploy jobs could be raised by different users with different roles, it is very important that specific environments are "protected" to avoid unauthorized people to affect them. This feature ensures that only people with the right privileges can deploy code to the "protected" environments, keeping them safe
Screenshots (if relevant)
|without Protected Environments||with Protected Environments|
Environments overview page
|When user has access||When user does not have access|
|With not enough permissions|
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- Tests added for this feature/bug
- Conform by the code review guidelines
- Has been reviewed by a UX Designer
- Has been reviewed by a Frontend maintainer
- Has been reviewed by a Backend maintainer
- Has been reviewed by a Database specialist
EE specific content should be in the top level
- Conform by the merge request performance guides
- Conform by the style guides
- If you have multiple commits, please combine them into a few logically organized commits by squashing them
- Internationalization required/considered
- If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan
End-to-end tests pass (
package-and-qamanual pipeline job)
To do (Backend)
- Implement Environment Dropdown for "Protect an environment" widget
- Save Protected Environments into database
- Create table for "Protected environments" (UI)
- Add column for "Last Deployment" (UI)
- Modify Environments API for Environment overview page (https://gitlab.com/gitlab-org/gitlab-ee/issues/2747#environment-overview-page)
- Model, controller, services logic
- Specs for model, controller and services
- Add proper policies
- Feature specs for UI
CI modifications. (New
playableactions to take into account
- Enable feature only for GitLab Premium
- Prepare a script for UX so they can easily test this: https://gitlab.com/snippets/1736674
What are the relevant issue numbers?
Closes #2747 (closed)