Fix for manager and admin can see all post in announcement. Haven't applied to news
This commit is contained in:
parent
dfd2d82efb
commit
b804ba4d96
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue