diff --git a/app/views/news/_contest_show.html.erb b/app/views/news/_contest_show.html.erb index 6c0b8feb1..10c4770fc 100644 --- a/app/views/news/_contest_show.html.erb +++ b/app/views/news/_contest_show.html.erb @@ -32,14 +32,14 @@ l(:button_edit), {:action => 'edit', :id => @news}, :class => 'postOptionLink' - ) if User.current.allowed_to?(:manage_news, @contest) %> + ) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
  • <%= delete_link( news_path(@news), :data => {:confirm => l(:text_are_you_sure)}, :class => 'postOptionLink' - ) if User.current.allowed_to?(:manage_news, @contest) %> + ) if User.current == @news.author || User.current.admin_of_contest?(@contest) %>
  • diff --git a/app/views/users/_contest_news.html.erb b/app/views/users/_contest_news.html.erb index 990430941..b97932124 100644 --- a/app/views/users/_contest_news.html.erb +++ b/app/views/users/_contest_news.html.erb @@ -45,14 +45,14 @@ l(:button_edit), {controller:'news', :action => 'edit', :id => activity.id}, :class => 'postOptionLink' - ) if User.current.allowed_to?(:manage_news, activity.course) %> + ) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
  • <%= delete_link( news_path(activity), :data => {:confirm => l(:text_are_you_sure)}, :class => 'postOptionLink' - ) if User.current.allowed_to?(:manage_news, activity.course) %> + ) if User.current == activity.author || User.current.admin_of_contest?(activity.contest) %>
  • <% end %>