diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-03 14:19:11 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-03 14:19:11 +0300 |
commit | 95d61a094d4d69fc332b40923ba08bbb57776f39 (patch) | |
tree | dc59a734c6ceee86f5529db299fd68cb7506b09b /app/controllers/admin | |
parent | 4e55dd5f1447d3050b3a683d0e5e131946ccedc0 (diff) | |
download | gitlab-ce-95d61a094d4d69fc332b40923ba08bbb57776f39.tar.gz |
Improve admin/projects page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 8c1f45ac01c..d2f86369b58 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController before_filter :repository, only: [:show, :transfer] def index - owner_id = params[:owner_id] - user = User.find_by(id: owner_id) - - @projects = user ? user.owned_projects : Project.all + @projects = Project.all + @projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present? @projects = @projects.where("visibility_level IN (?)", params[:visibility_levels]) if params[:visibility_levels].present? @projects = @projects.with_push if params[:with_push].present? @projects = @projects.abandoned if params[:abandoned].present? |