Adds API to control model registry project setting
What does this MR do and why?
Continuing on the work in Add feature toggle for Model registry (#412734 - closed), this MR adds the configuration to allow the project settings API to control the setting for the GitLab Model Registry. It adds:
- On
GET projects/:id
, returns current value ofmodel_registry_access_level
- On
POST projects
, set the value ofmodel_registry_access_level
- On
PUT projects
, update the value ofmodel_registry_access_level
How to set up and validate locally
- Get request should display the value of
model_registry_access_level
:
curl -X GET -H "Authorization: Bearer $GITLAB_TOKEN" "http://localhost:3000/api/v4/projects/$PROJECT_ID" | jq
- Updating a project should change the value of
model_registry_access_level
:
curl --request PUT -H "Authorization: Bearer $GITLAB_TOKEN" --data "model_registry_access_level=disabled" --URL "http://localhost:3000/api/v4/projects/$PROJECT_ID" | jq
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.