超级管理员要有对竞赛通知编辑、删除的权限
This commit is contained in:
parent
a5e6ed0d39
commit
a60c83fe00
|
@ -32,14 +32,14 @@
|
||||||
l(:button_edit),
|
l(:button_edit),
|
||||||
{:action => 'edit', :id => @news},
|
{:action => 'edit', :id => @news},
|
||||||
:class => 'postOptionLink'
|
: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>
|
||||||
<li>
|
<li>
|
||||||
<%= delete_link(
|
<%= delete_link(
|
||||||
news_path(@news),
|
news_path(@news),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:class => 'postOptionLink'
|
: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>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -45,14 +45,14 @@
|
||||||
l(:button_edit),
|
l(:button_edit),
|
||||||
{controller:'news', :action => 'edit', :id => activity.id},
|
{controller:'news', :action => 'edit', :id => activity.id},
|
||||||
:class => 'postOptionLink'
|
: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>
|
||||||
<li>
|
<li>
|
||||||
<%= delete_link(
|
<%= delete_link(
|
||||||
news_path(activity),
|
news_path(activity),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:class => 'postOptionLink'
|
: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>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue