Validate ProtectedEnvironments::DeployAccessLevel on the model level
What does this MR do and why?
Adds proper model-level validation to ProtectedEnvironments::DeployAccessLevel
.
See more in Data integrity issue on `protected_environment_... (#330483 - closed) and related discussion in !110782 (comment 1308802104)
- Once this is merged, we need to re-run the migration from Cleanup invalid deploy access levels for protec... (!110686 - merged) - I'll open a separate MR.
- After the migration is re-run, we'll the database constraint from Add validity check to deploy access levels (!110782 - closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #330483 (closed)
Edited by Vladimir Shushlin