Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-14 15:54:23 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-14 15:54:23 +0300
commitd945300b8e49c927da8a12ba3a8bac68dbc4b9fc (patch)
tree6d82d5a6b8e94a54d6d936d02a65039b1d395a60 /app/services
parentec0daedbc45104324387804ef7c3c9337fde1fda (diff)
Check permissions before stopping CI environments
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/stop_environment_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/ci/stop_environment_service.rb b/app/services/ci/stop_environment_service.rb
index cb49f71c5a3..79a0b1369c9 100644
--- a/app/services/ci/stop_environment_service.rb
+++ b/app/services/ci/stop_environment_service.rb
@@ -10,6 +10,7 @@ module Ci
environments.each do |environment|
next unless environment.stoppable?
+ next unless can?(current_user, :create_deployment, project)
environment.stop!(current_user)
end