From 60bdff86a154d96f7b1d512cc56f3e15f2252e38 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Thu, 12 Jun 2014 10:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=80=9A=E7=9F=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9D=83=E9=99=90=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contestnotifications/index.html.erb | 2 +- app/views/contestnotifications/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %>