Protected Environments - Backend
What does this MR do?
It includes backend structure for Protected Environments functionality. When building Protected Environments feature (https://gitlab.com/gitlab-org/gitlab-ee/issues/2747) on https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6303, the MR got too big (since it involves changing several parts of the codebase). To facilitate the reviews, we decided to split the original MR in two: one for the backend and another one for the frontend.
CE port https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20859
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.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
EE specific content should be in the top level /ee
folder -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database 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-qa
manual pipeline job)