requirements_access_level set to disabled does nothing via API
Summary
When setting requirements_access_level
to disabled
nothing happens. The API returns an error if the field is the only field included and otherwise Requirements are not disabled and upon subsequent calls to the API requirements_enabled
is true
. (Also, requirements_access_level
is never returned from the API).
Steps to reproduce
curl -X PUT -H "PRIVATE-TOKEN: $GITLAB_TOKEN"-H "Content-Type: application/json" -d '{"requirements_access_level":"disabled"}' "https://gitlab.com/api/v4/projects/24785459"
Example Project
24785459
What is the current bug behavior?
This field is ignored
What is the expected correct behavior?
I expect this to disable the Requirements feature
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Edited by James Hartig