Add compliance framework setting to projects
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
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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