Enable new approval status names from `managed_licenses` API
What does this MR do and why?
With #335707 (closed) we deprecated blacklisted
and approved
statuses in managed_licenses
API, now we need to remove them. These statuses are used in requests and in the response. We are removing all related code to request parameters. To enable new response statuses we will enable a feature flag, to allow synchronize changes between the backend and our frontend code, as we use these API endpoints internally.
Issue #345839 (closed)
Screenshots or screen recordings
➜ gitlab git:(345839-enable-feature-flag) curl --data "name=MIT2&approval_status=denied" --header "PRIVATE-TOKEN: gVrp-QWfsENkb-kK_J97" http://127.0.0.1:3000/api/v4/projects/116/managed_licenses
{"id":5,"name":"MIT2","approval_status":"denied"}%
➜ gitlab git:(345839-enable-feature-flag) curl --request PATCH --data "approval_status=allowed" \
--header "PRIVATE-TOKEN: gVrp-QWfsENkb-kK_J97" "http://127.0.0.1:3000/api/v4/projects/116/managed_licenses/5"
{"id":5,"name":"MIT2","approval_status":"allowed"}%
How to set up and validate locally
Run curl --data "name=MIT&approval_status=denied" --header "PRIVATE-TOKEN: <your_access_token>" {your local gitlab}/api/v4/projects/{project id}/managed_licenses"
to see that request performs correctly and new values denied
or allowed
are returned.
curl --request PATCH --data "approval_status=denied" \ --header "PRIVATE-TOKEN: <your_access_token>" "{your local gitlab}/api/v4/projects/{id}/managed_licenses/{id}"
to check that update endpoint works correctly.
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.