diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-14 15:54:23 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-14 15:54:23 +0300 |
commit | d945300b8e49c927da8a12ba3a8bac68dbc4b9fc (patch) | |
tree | 6d82d5a6b8e94a54d6d936d02a65039b1d395a60 /app/services | |
parent | ec0daedbc45104324387804ef7c3c9337fde1fda (diff) |
Check permissions before stopping CI environments
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/stop_environment_service.rb | 1 |
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 |