From e696516aae2264bf16134b1d89a9a97ebde57f08 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 11 May 2012 17:07:21 +0800 Subject: [PATCH] Fix for manager and admin can see all post in announcement. Haven't applied to news --- .../announcement/back_end/bulletins_controller.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 7d89183e..325f60f7 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -43,10 +43,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController @bulletin_file = BulletinFile.new @file_url = panel_announcement_back_end_bulletins_path - @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) - } - + 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 format.js { }