Add user_list to feature_flag api
What does this MR do and why?
related issue: #417984 (closed)
Add strategy user_list
to feature flags api
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Create a project and remember the project ID:
{{PROJECT_ID}}
- Create a personal access token:
{{ACCESS_TOKEN}}
- Create a user list (replace
{{PROJECT_ID}}
and{{ACCESS_TOKEN}}
):curl --location 'http://localhost:3000/api/v4/projects/{{PROJECT_ID}}/feature_flags_user_lists' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \ --data '{ "name": "my_user_list", "user_xids": "user1,user2,user3" }'
- Remember the user list ID:
{{USER_LIST_ID}}
- Create a feature flag with the user list as strategy (replace
{{PROJECT_ID}}
,{{ACCESS_TOKEN}}
and{{USER_LIST_ID}}
):curl --location 'http://localhost:3000/api/v4/projects/{{PROJECT_ID}}/feature_flags' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \ --data '{ "name": "test", "version": "new_version_flag", "strategies": [ { "name": "gitlabUserList", "user_list_id": {{USER_LIST_ID}} } ] }'
- The feature flag should be successfully created
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.
Edited by Andy Schoenen