issue详情删除权限

This commit is contained in:
huang 2016-12-09 20:40:30 +08:00
parent 85ef1108c9
commit b85cad8c7f
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@
<% @issue_commit_ids.each do |commit_id| %> <% @issue_commit_ids.each do |commit_id| %>
<div class="btn btn-blue mb5"> <div class="btn btn-blue mb5">
<%= 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 commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %>
<% 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;" %> <%= 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 %>
</div> </div>
<% end %> <% end %>
<% else %> <% else %>