Projects API: cannot filter for disabled features
Summary
As discussed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12724#note_54688768, there is currently no way to specifically filter for disabled features (i.e. with_issues_enabled=false
, applicable to all params).
I am not sure if this applies to any API, I just noticed while working on the Merge Request from before, so it might make sense to check if the current behaviour is indeed the expected behaviour.
Steps to reproduce
curl 'https://gitlab.com/api/v4/projects?with_issues_enables=false&order_by=name&per_page=5'
What is the current bug behavior?
The filter does not get applied and returns projects with the feature enabled
What is the expected correct behavior?
It should only return projects with the feature disabled.
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb#L79
it would need to include handling for the parameter being false explicitly and filter accordingly.