Fix's Matt code for not showing bulletins in index
This commit is contained in:
parent
815e6a8361
commit
c4d7079059
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue