From c4d70790595a8d8127732224ea9bd5097d392998 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Mon, 21 May 2012 18:10:03 +0800 Subject: [PATCH] Fix's Matt code for not showing bulletins in index --- app/controllers/orbit_backend_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/orbit_backend_controller.rb b/app/controllers/orbit_backend_controller.rb index 1584f512..12ba78e4 100644 --- a/app/controllers/orbit_backend_controller.rb +++ b/app/controllers/orbit_backend_controller.rb @@ -168,7 +168,15 @@ class OrbitBackendController< ApplicationController end if(!is_admin? || !is_manager?) objects.delete_if{ |object| - (object.is_pending == true) && ((!object.send("#{object.class.to_s.underscore}_category").authed_users('fact_check').include?(current_user) rescue nil) || object.create_user_id!=current_user.id) + if object.is_pending == true + if check_permission(:manager) + object.create_user_id != current_user.id + else + !object.send("#{object.class.to_s.underscore}_category").authed_users('fact_check').include?(current_user) rescue false + end + else + false + end } end objects