summaryrefslogtreecommitdiff
path: root/app/views/projects/environments/show.html.haml
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 11:07:12 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 11:07:12 +0200
commit20047e72d814e1d5fd744a0eda843019eb4e0b3f (patch)
tree5702eeb09992a811c345381992748a06bef3b402 /app/views/projects/environments/show.html.haml
parentf8eb8feae3aa146c41433308abd2e184d73688e5 (diff)
downloadgitlab-ce-20047e72d814e1d5fd744a0eda843019eb4e0b3f.tar.gz
Fix environment specs related to protected actions
Diffstat (limited to 'app/views/projects/environments/show.html.haml')
-rw-r--r--app/views/projects/environments/show.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 7315e671056..9e221240cf2 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -13,7 +13,7 @@
= render 'projects/environments/metrics_button', environment: @environment
- if can?(current_user, :update_environment, @environment)
= link_to 'Edit', edit_namespace_project_environment_path(@project.namespace, @project, @environment), class: 'btn'
- - if can?(current_user, :create_deployment, @environment) && @environment.can_stop?
+ - if can?(current_user, :stop_environment, @environment)
= link_to 'Stop', stop_namespace_project_environment_path(@project.namespace, @project, @environment), data: { confirm: 'Are you sure you want to stop this environment?' }, class: 'btn btn-danger', method: :post
.environments-container