Fix for manager and admin can see all post in announcement. Haven't applied to news

This commit is contained in:
Matthew K. Fu JuYuan 2012-05-11 17:07:21 +08:00 committed by Christophe Vilayphiou
parent dfd2d82efb
commit b804ba4d96
1 changed files with 6 additions and 4 deletions

View File

@ -43,9 +43,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
@bulletin_file = BulletinFile.new @bulletin_file = BulletinFile.new
@file_url = panel_announcement_back_end_bulletins_path @file_url = panel_announcement_back_end_bulletins_path
if(!is_admin? || !is_manager?)
@bulletins.delete_if{ |bulletin| @bulletins.delete_if{ |bulletin|
bulletin.is_pending == true && (!bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || bulletin.create_user_id!=current_user.id) bulletin.is_pending == true && (!bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || bulletin.create_user_id!=current_user.id)
} }
end
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb