Toggle built_in_project_templates_enabled instance setting via REST API
What does this MR do and why?
Toggle built_in_project_templates_enabled instance setting via REST API
Expose built_in_project_templates_enabled and lock_built_in_project_templates_enabled on the application_setting entity, allowing those attributes to be updated through the application setting 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 instance has a premium or ultimate license
Feature.disable(:use_built_in_project_templates_enabled)built_in_project_templates_enabledandlock_built_in_project_templates_enabledare not returned fromGET /application/settings
curl --request GET \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/application/settings"built_in_project_templates_enabledandlock_built_in_project_templates_enabledare not updated byPUT /application/settings
curl --request PUT \
--header "PRIVATE-TOKEN: <token>" \
--url "http://localhost:3000/api/v4/application/settings" \
--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/application/settings"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/application/settings" \
--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