Skip to content

Add compliance merge request approval settings

What does this MR do?

This MR allows administrators to scope merge request approval settings to specific compliance frameworks.

Feature flag

This feature is under a feature flag: admin_compliance_merge_request_approval_settings

Design notes

The process flow presented in this MR is as followed:

graph LR
  a[PUT admin/application_settings] --> b[ApplicationSettingsController] --> c[ApplicationSettings] --> d[application_setttings] 

More technical discussion can be found here #219359 (closed)

Screenshots

Feature disabled Feature enabled
Screen_Shot_2020-06-09_at_12.06.49_pm Screen_Shot_2020-06-09_at_12.05.15_pm

Database changes

This MR adds a new column to application_settings

Column Type Nullable Default
compliance_frameworks smallint[] '{}'::smallint[]
rake db:migrate:redo VERSION=20200613104045
== 20200613104045 AddComplianceFrameworksToApplicationSettings: reverting =====
-- remove_column(:application_settings, :compliance_frameworks)
   -> 0.0016s
== 20200613104045 AddComplianceFrameworksToApplicationSettings: reverted (0.0067s) 

== 20200613104045 AddComplianceFrameworksToApplicationSettings: migrating =====
-- add_column(:application_settings, :compliance_frameworks, :integer, {:limit=>2, :array=>true, :default=>[]})
   -> 0.0027s
== 20200613104045 AddComplianceFrameworksToApplicationSettings: migrated (0.0054s)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tan Le

Merge request reports