summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-05 20:26:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-05 20:26:21 +0200
commit3b20c89005686c04966d749239ce312b65bd8f59 (patch)
tree2c1c7d1771ee5b9b6579bc8952b5422a6428446b /app/controllers/dashboard_controller.rb
parenta767c13367c25d2684c94a90ee9f91f02da286a9 (diff)
downloadgitlab-ce-3b20c89005686c04966d749239ce312b65bd8f59.tar.gz
Add visibility filter to Dashboard#projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 17715020f87..045e5805bd0 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -40,6 +40,7 @@ class DashboardController < ApplicationController
end
@projects = @projects.where(namespace_id: Group.find_by_name(params[:group])) if params[:group].present?
+ @projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present?
@projects = @projects.includes(:namespace).sorted_by_activity
@labels = current_user.authorized_projects.tags_on(:labels)