summaryrefslogtreecommitdiff
path: root/app/services/ci/stop_environments_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/ci/stop_environments_service.rb')
-rw-r--r--app/services/ci/stop_environments_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/ci/stop_environments_service.rb b/app/services/ci/stop_environments_service.rb
index 43c9a065fcf..439746e82bd 100644
--- a/app/services/ci/stop_environments_service.rb
+++ b/app/services/ci/stop_environments_service.rb
@@ -8,7 +8,7 @@ module Ci
return unless @ref.present?
environments.each do |environment|
- next unless environment.stop_action?
+ next unless environment.stop_action_available?
next unless can?(current_user, :stop_environment, environment)
environment.stop_with_action!(current_user)