From 9bcd36396b9b71467f66dd4ed79ab709bb5d027a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 25 May 2015 10:42:41 -0400 Subject: Refactor permission checks to use `can?` instead of `issues_enabled` and `merge_requests_enabled` --- app/views/projects/milestones/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (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 22172a31289..5845fd744f4 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -61,11 +61,12 @@ Participants %span.badge= @users.count - - if can?(current_user, :write_issue, @project) - .pull-right + .pull-right + - if can?(current_user, :write_issue, @project) = 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 New Issue + - if can?(current_user, :read_issue, @project) = link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped" .tab-content -- cgit v1.2.3