diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index 563b2d3e1..a9ab5b775 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -38,7 +38,7 @@ <%= link_to_user(contestnotifications.author) if contestnotifications.respond_to?(:author) %> <%= l(:label_project_notice) %><%= link_to h(contestnotifications.title), contest_contestnotification_path(@contest, contestnotifications) %> - <%= delete_link contest_contestnotification_path(@contest, contestnotifications) if true || User.current.allowed_to?(:manage_contestnotifications, @contest) %> + <%= delete_link contest_contestnotification_path(@contest, contestnotifications) if (User.current.admin? && User.current.logged? )||(User.current == @contest.author && User.current.logged?) %> diff --git a/app/views/contestnotifications/show.html.erb b/app/views/contestnotifications/show.html.erb index 016de36ca..8cc9c8adb 100644 --- a/app/views/contestnotifications/show.html.erb +++ b/app/views/contestnotifications/show.html.erb @@ -5,7 +5,7 @@ :class => 'icon icon-edit', :accesskey => accesskey(:edit), :onclick => '$("#edit-contestnotifications").show(); return true;') if User.current %> - <%= delete_link contest_contestnotification_path(@contest, @contestnotification) if User.current %> + <%= delete_link contest_contestnotification_path(@contest, @contestnotification) if (User.current.admin? && User.current.logged? )||(User.current == @contest.author && User.current.logged?) %>

<%=h @contestnotification.title %>