Toggle built_in_project_templates_enabled group setting via REST API
What does this MR do and why?
Toggle built_in_project_templates_enabled group setting via REST API
Expose built_in_project_templates_enabled and lock_built_in_project_templates_enabled on the namepsace entity, allowing those attributes to be updated through the namespace settings REST API update endpoint.
EE: true
Documentation to follow and tracked by #596907 (closed)
References
Contributes to #593619 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Make sure your group has a premium or ultimate license, and you are an owner of the group
Feature.disable(:use_built_in_project_templates_enabled)built_in_project_templates_enabledandlock_built_in_project_templates_enabledare not returned fromGET /groups/<group_id>
curl --request GET \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/groups/<group_id>"built_in_project_templates_enabledandlock_built_in_project_templates_enabledare not updated byPUT /groups/<group_id>
curl --request PUT \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/groups/<group_id>" \
--data "built_in_project_templates_enabled=true" \
--data "lock_built_in_project_templates_enabled=true"Feature.enable(:use_built_in_project_templates_enabled)built_in_project_templates_enabledandlock_built_in_project_templates_enabledare returned fromGET /application/settings
curl --request GET \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/groups/<group_id>"6.built_in_project_templates_enabled and lock_built_in_project_templates_enabled are updated by PUT /application/settings
curl --request PUT \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/groups/<group_id>" \
--data "built_in_project_templates_enabled=true" \
--data "lock_built_in_project_templates_enabled=true"MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Fred Reinink