Merge branch 'ldap' of github.com:Rulingcom/orbit into ldap
This commit is contained in:
commit
2c16284f73
|
@ -47,7 +47,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
|
||||
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)
|
||||
bulletin.is_pending == true && ((!bulletin.bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) || bulletin.create_user_id!=current_user.id)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ module Panel::Announcement::BackEnd::BulletinsHelper
|
|||
|
||||
def show_approval_link(bulletin)
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
@link_url = panel_news_back_end_news_bulletins_path
|
||||
|
||||
@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
|
||||
|
|
|
@ -2,7 +2,7 @@ module Panel::News::BackEnd::NewsBulletinsHelper
|
|||
|
||||
def news_show_approval_link(news_bulletin)
|
||||
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
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue