Skip to content

Add compliance framework setting to projects

Robert Hunt requested to merge add-compliance-framework-setting-to-projects into master

What does this MR do?

As part #118671 (closed) we need to be able to define the compliance framework that a project uses. This MR adds a new project_compliance_framework_settings table to store this value and adds the dropdown to the projects edit screen.

After this MR we will start showing the framework in the relevant places as shown in the design specs for #118671 (closed).

There are plans for further work to prefill this setting using project templates: #118671 (comment 310202179).

The new Compliance Framework option should only be available when the following is true:

  • The license is equivalent to GitLab Ultimate
  • The user has the permissions to administer the project

Migration output

rails db:migrate
== 20200331132103 AddProjectComplianceFrameworkSettingsTable: migrating =======
-- create_table(:project_compliance_framework_settings, {:id=>false})
   -> 0.0082s
== 20200331132103 AddProjectComplianceFrameworkSettingsTable: migrated (0.0170s) 


rails db:rollback
== 20200331132103 AddProjectComplianceFrameworkSettingsTable: reverting =======
-- drop_table(:project_compliance_framework_settings)
   -> 0.0033s
== 20200331132103 AddProjectComplianceFrameworkSettingsTable: reverted (0.0132s) 

Screenshots

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

For manual testing:

  • Edit an existing project and confirm that you can set and clear the dropdown option
  • Create a new project and confirm you can edit it to set and clear the dropdown option
  • Change your license to be less than GitLab Ultimate and confirm that you don't see the dropdown option
  • Log in as a user without the project administration permission and confirm that you don't see the dropdown (if you can see the edit page at all 😅)
Edited by Robert Hunt

Merge request reports