diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-30 11:38:03 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-30 11:38:03 +0200 |
commit | d145f09cd675fa46a6cc20fac8304f02d2d14656 (patch) | |
tree | fc4dea5f42832ffa6dca748bf0ae30a776889f75 /app/views/groups/milestones/show.html.haml | |
parent | e66a8b4cdab176ff89a685788dcbcac089712e49 (diff) | |
download | gitlab-ce-d145f09cd675fa46a6cc20fac8304f02d2d14656.tar.gz |
Correct authorization for group milestones.
Diffstat (limited to 'app/views/groups/milestones/show.html.haml')
-rw-r--r-- | app/views/groups/milestones/show.html.haml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml index d7bf6ae3c5c..7e66318e968 100644 --- a/app/views/groups/milestones/show.html.haml +++ b/app/views/groups/milestones/show.html.haml @@ -1,10 +1,11 @@ %h3.page-title Milestone #{@group_milestone.title} .pull-right - - if @group_milestone.active? - = link_to 'Close Milestone', group_milestone_path(@group, @group_milestone.safe_title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove" - - else - = link_to 'Reopen Milestone', group_milestone_path(@group, @group_milestone.safe_title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped" + - if can?(current_user, :manage_group, @group) + - if @group_milestone.active? + = link_to 'Close Milestone', group_milestone_path(@group, @group_milestone.safe_title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove" + - else + = link_to 'Reopen Milestone', group_milestone_path(@group, @group_milestone.safe_title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped" - if (@group_milestone.total_items_count == @group_milestone.closed_items_count) && @group_milestone.active? .alert.alert-success |