[BE] Add API to allow updates of CSP
Why are we doing this work
In order to designate a group as CSP, we need to build API to change the csp_namespace_id attribute of a Security::PolicySetting instance.
Relevant links
Implementation plan
- Add the attribute
csp_namespace_idtoee/app/controllers/ee/admin/application_settings_controller.rb - Add the attribute to
ee/app/helpers/ee/application_settings_helper.rb - Delegate the attribute to
Security::PolicySetting.instancesimilar toAi::Setting.instancehere.
Verification steps
- Verify the API following the documentation (locally, CSP is not available on GitLab.com): https://docs.gitlab.com/api/compliance_policy_settings/
- Enable feature flag
security_policies_csp - Verify that the attribute is returned in
GETresponse - Verify that the attribute can be set using a
PUTrequest
Edited by 🤖 GitLab Bot 🤖