Add authorization for rescue interface
Change logic for NCCU site for status panel.
This commit is contained in:
1 parent
6059edad70
commit
f1b4d9e204
7 files changed
+10
-8
No files matched your search
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
module Panel::Announcement::BackEnd::BulletinsHelper
|
||||
def show_form_status_field(bulletin)
|
||||
by_bulletin = (!bulletin.is_expired? and bulletin.is_pending?)
|
||||
#by_bulletin = (!bulletin.is_expired? and bulletin.is_pending?)
|
||||
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_user
|
||||
end
|
||||
|
||||
def show_approval_link(bulletin)
|
||||
|
||||
@@ -222,7 +222,7 @@ class Bulletin
|
||||
end
|
||||
|
||||
def fetch_dept
|
||||
self.cache_dept = (User.current.cache_dept rescue nil) || (User.find(self.create_user_id).cache_dept rescue nil)
|
||||
self.cache_dept = User.find(self.create_user_id).cache_dept rescue nil
|
||||
end
|
||||
|
||||
end
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<li>
|
||||
<%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category_id) %>
|
||||
<%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category_id ,:tag_id=>bulletin.tags.first.id ) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
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_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) rescue nil) or is_manager? or is_admin?)
|
||||
by_news_bulletin and by_user
|
||||
by_user
|
||||
end
|
||||
|
||||
def news_show_approval_link(news_bulletin)
|
||||
|
||||
Reference in new issue
Block a user