Fix's Matt code for not showing bulletins in index

This commit is contained in:
Christophe Vilayphiou committed 2012-05-21 18:10:03 +08:00
1 parent 815e6a8361
commit c4d7079059
1 file changed
+9 -1
+9 -1
View File
@@ -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