Fix auth_users bug without category in news
This commit is contained in:
parent
f092aff9e9
commit
625801c0e9
|
@ -1,13 +1,13 @@
|
|||
module Panel::News::BackEnd::NewsBulletinsHelper
|
||||
def news_show_form_status_field(news_bulletin)
|
||||
by_news_bulletin = (!news_bulletin.is_expired? and news_bulletin.is_pending?)
|
||||
by_user = (news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) or is_manager? or is_admin?)
|
||||
by_user = ((news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager? or is_admin?)
|
||||
by_news_bulletin and by_user
|
||||
end
|
||||
|
||||
def news_show_approval_link(news_bulletin)
|
||||
by_news_bulletin = (!news_bulletin.is_expired? and news_bulletin.is_pending?)
|
||||
by_user = (news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) or is_manager? or is_admin?)
|
||||
by_user = ((news_bulletin.news_bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) or is_manager? or is_admin?)
|
||||
by_news_bulletin and by_user
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue