From b85cad8c7fa1b8feedff14a9594186e101149ab3 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 9 Dec 2016 20:40:30 +0800 Subject: [PATCH] =?UTF-8?q?issue=E8=AF=A6=E6=83=85=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_issue_commit_ids.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/issues/_issue_commit_ids.html.erb b/app/views/issues/_issue_commit_ids.html.erb index 6bc3f5a01..d52998297 100644 --- a/app/views/issues/_issue_commit_ids.html.erb +++ b/app/views/issues/_issue_commit_ids.html.erb @@ -2,7 +2,9 @@ <% @issue_commit_ids.each do |commit_id| %>
<%= link_to commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %> - <%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %> + <% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || User.current.id == @issue.author_id %> + <%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %> + <% end %>
<% end %> <% else %>