diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 9af36164c..de3f1d41f 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -138,11 +138,23 @@
<% if @project.gpid %>
<%#= hidden_field_tag @issue_commit_ids %>
-
关联Commit
-
- +
-
-
+ <% if @issue %>
+ <% if is_project_manager?(User.current.id, @project.id)|| User.current.id == @issue.author_id || User.current.admin? %>
+ 关联Commit
+
+ +
+
+
+ <% end %>
+ <% else %>
+ <% if User.current.member_of?(@project) %>
+ 关联Commit
+
+ +
+
+
+ <% end %>
+ <% end %>
<%= render :partial => "issues/issue_commit_ids", :locals => {:f => f} %>
diff --git a/app/views/issues/_issue_commits.html.erb b/app/views/issues/_issue_commits.html.erb
index 3190cda41..05a6557cb 100644
--- a/app/views/issues/_issue_commits.html.erb
+++ b/app/views/issues/_issue_commits.html.erb
@@ -22,7 +22,7 @@
-
+
<%= submit_tag '', :class => 'hw_btn_search', :onfocus => 'this.blur();', :style => 'border-style:none' %>
<% end %>
diff --git a/app/views/issues/_issue_commits_list.html.erb b/app/views/issues/_issue_commits_list.html.erb
index b6fc888a1..0f10d10f6 100644
--- a/app/views/issues/_issue_commits_list.html.erb
+++ b/app/views/issues/_issue_commits_list.html.erb
@@ -51,7 +51,6 @@
str += ",";
}
}
- alert(str);
$('#issue_for_commit_ids').val(str);
$('#commit_for_issue').submit();
hideModal();