summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-04-15 21:35:48 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-04-18 17:32:47 -0500
commitded5efad1ffddb5f1bf8585802bb25e588eee6ea (patch)
tree4316fe025a5deb0197df77a3dff40500c5651e26 /app/controllers
parent17b60d681828567e47c8a62ef312abc46e2beeea (diff)
downloadgitlab-ce-ded5efad1ffddb5f1bf8585802bb25e588eee6ea.tar.gz
Allow filtering by Owned projects
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/filter_projects.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/concerns/filter_projects.rb b/app/controllers/concerns/filter_projects.rb
index f63b703d101..091412a7c93 100644
--- a/app/controllers/concerns/filter_projects.rb
+++ b/app/controllers/concerns/filter_projects.rb
@@ -10,6 +10,11 @@ module FilterProjects
def filter_projects(projects)
projects = projects.search(params[:filter_projects]) if params[:filter_projects].present?
projects = projects.non_archived if params[:archived].blank?
+
+ if params[:personal].present? and current_user
+ projects = projects.personal(current_user)
+ end
+
projects
end
end