Merge branch 'design_team' into ldap

This commit is contained in:
Christophe Vilayphiou 2012-05-18 10:51:20 +08:00
commit f72d0bc7e0
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
if(!is_admin? || !is_manager?) 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) rescue nil) || bulletin.create_user_id!=current_user.id)
} }
end end

View File

@ -2,7 +2,7 @@ module Panel::Announcement::BackEnd::BulletinsHelper
def show_approval_link(bulletin) def show_approval_link(bulletin)
by_bulletin = (!bulletin.is_expired? and !bulletin.is_checked?) by_bulletin = (!bulletin.is_expired? and !bulletin.is_checked?)
by_user = (bulletin.bulletin_category.authed_users('fact_check').include?(current_user) or is_manager? or is_admin?) by_user = ((bulletin.bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager? or is_admin?)
by_bulletin and by_user by_bulletin and by_user
end end

View File

@ -43,7 +43,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
@link_url = panel_news_back_end_news_bulletins_path @link_url = panel_news_back_end_news_bulletins_path
@news_bulletins.delete_if{ |news_bulletin| @news_bulletins.delete_if{ |news_bulletin|
news_bulletin.is_pending == true && (!news_bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || news_bulletin.create_user_id!=current_user.id) news_bulletin.is_pending == true && ((!news_bulletin.bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) || news_bulletin.create_user_id!=current_user.id)
} }
@news_bulletin_file = NewsBulletinFile.new @news_bulletin_file = NewsBulletinFile.new

View File

@ -2,7 +2,7 @@ module Panel::News::BackEnd::NewsBulletinsHelper
def news_show_approval_link(news_bulletin) def news_show_approval_link(news_bulletin)
by_news_bulletin = (!news_bulletin.is_expired? and !news_bulletin.is_checked?) by_news_bulletin = (!news_bulletin.is_expired? and !news_bulletin.is_checked?)
by_user = news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) or is_manager? by_user = (news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager?
by_news_bulletin and by_user by_news_bulletin and by_user
end end