Skip to content

Database Modeling for Multi Access Levels in Deployment Approval

Shinya Maeda requested to merge dep-approval-multi-access-levels into master

What does this MR do and why?

This MR adds the database modeling for Multi Access Levels in Deployment Approval.

  • ProtectedEnvironment::ApprovalRule represents a rule of a protected environment. It has one of the three authorization types - user-base, group-base and role-base. This is the same behavior with ProtectedEnvironment::DeployAccessLevel.
  • We refactor these models with Authorizable shared concern.

These models will be used in an upcoming MR. You can find how it's actually used in PoC MRs - PoC 1, PoC 2.

FYI, in order to avoid spreading a data integrity issue of DeployAccessLevel, we add a correct validation constraint to ApprovalRule.

To learn the concept of Protected Environment, please see the documentation.

Migration output

See the db:check-migrations job.

Screenshots or screen recordings

N/A (See the manual QA result of PoC)

How to set up and validate locally

N/A (See the manual QA result of PoC)

MR acceptance checklist

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

Edited by Shinya Maeda

Merge request reports