超级管理员要有对竞赛通知编辑、删除的权限
This commit is contained in:
parent
a5e6ed0d39
commit
a60c83fe00
|
@ -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>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in New Issue