超级管理员要有对竞赛通知编辑、删除的权限

This commit is contained in:
cxt 2016-12-30 20:35:40 +08:00
parent a5e6ed0d39
commit a60c83fe00
2 changed files with 4 additions and 4 deletions

View File

@ -32,14 +32,14 @@
l(:button_edit),
{:action => 'edit', :id => @news},
:class => 'postOptionLink'
) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
) if User.current == @news.author || User.current.admin_of_contest?(@contest) || User.current.admin? %>
</li>
<li>
<%= delete_link(
news_path(@news),
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
) if User.current == @news.author || User.current.admin_of_contest?(@contest) || User.current.admin? %>
</li>
</ul>
</li>

View File

@ -45,14 +45,14 @@
l(:button_edit),
{controller:'news', :action => 'edit', :id => activity.id},
:class => 'postOptionLink'
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) || User.current.admin? %>
</li>
<li>
<%= delete_link(
news_path(activity),
:data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink'
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) || User.current.admin? %>
</li>
</ul>
<% end %>