summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2016-01-22 09:34:45 +0100
committerAchilleas Pipinellis <axilleas@axilleas.me>2016-01-22 09:34:45 +0100
commit831eb9468d5f82bd7d0c4e51e6ce87ca86aeca8c (patch)
tree739f342da21ad303605f997eb578ef5ce18d256d /lib/api/helpers.rb
parentb4d61ac46babc04f67bb191c477dddc88e10ad45 (diff)
parent8be4e545635f0f01993290b4577dbe38e74c6bbf (diff)
downloadgitlab-ce-831eb9468d5f82bd7d0c4e51e6ce87ca86aeca8c.tar.gz
Merge branch 'master' into doc_refactor_commits_api
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 6d2380cf47d..3f528b9f7c0 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -264,6 +264,10 @@ module API
projects = projects.search(params[:search])
end
+ if params[:visibility].present?
+ projects = projects.search_by_visibility(params[:visibility])
+ end
+
projects.reorder(project_order_by => project_sort)
end