summaryrefslogtreecommitdiff
path: root/app/views/groups/milestones/show.html.haml
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-30 11:38:03 +0200
committerMarin Jankovski <marin@gitlab.com>2014-06-30 11:38:03 +0200
commitd145f09cd675fa46a6cc20fac8304f02d2d14656 (patch)
treefc4dea5f42832ffa6dca748bf0ae30a776889f75 /app/views/groups/milestones/show.html.haml
parente66a8b4cdab176ff89a685788dcbcac089712e49 (diff)
downloadgitlab-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.haml9
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