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
parent 82d1d3fed8
commit e696516aae
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
@file_url = panel_announcement_back_end_bulletins_path
if(!is_admin? || !is_manager?)
@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)
}
end
respond_to do |format|
format.html # index.html.erb