From a7d8a7bd3d4b6f7b388d8976201cbdf3b36ab7aa Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 22 May 2015 06:17:37 -0400 Subject: Disable "New Issue" and "New Merge Request" buttons when features are disabled in project settings Closes #1676 --- app/views/projects/milestones/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/projects/milestones/show.html.haml') diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index bba2b8764ac..22172a31289 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -61,7 +61,7 @@ Participants %span.badge= @users.count - - if @project.issues_enabled + - if can?(current_user, :write_issue, @project) .pull-right = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do %i.fa.fa-plus -- cgit v1.2.3