From d9bb4230cc3aa161876df821c34d8e9c53d2e7a6 Mon Sep 17 00:00:00 2001 From: Jason Hollingsworth Date: Wed, 6 Nov 2013 09:13:21 -0600 Subject: Adding authenticated public mode (internal). Added visibility_level icons to project view (rather than just text). Added public projects to search results. Added ability to restrict visibility levels standard users can set. --- app/controllers/admin/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/admin') diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 4de0a65b5fe..0e8335f3d8b 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -8,7 +8,7 @@ class Admin::ProjectsController < Admin::ApplicationController user = User.find_by_id(owner_id) @projects = user ? user.owned_projects : Project.scoped - @projects = @projects.where(public: true) if params[:public_only].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? @projects = @projects.search(params[:name]) if params[:name].present? -- cgit v1.2.1