summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-07 11:26:59 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-07 11:26:59 -0600
commit8116e400be83997206b1ed12534d3a71ae4b6333 (patch)
tree182eeca5885fc75f1349d8db66283d21ca8f01a9 /app/finders
parent9d7c5e75841eff48217487b3acda56cf265a2aef (diff)
downloadgitlab-ce-8116e400be83997206b1ed12534d3a71ae4b6333.tar.gz
Don't skip authorization when stopping CI environments
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/environments_finder.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/finders/environments_finder.rb b/app/finders/environments_finder.rb
index 5c798a75945..2f1a09fcb55 100644
--- a/app/finders/environments_finder.rb
+++ b/app/finders/environments_finder.rb
@@ -5,7 +5,7 @@ class EnvironmentsFinder
@project, @current_user, @params = project, current_user, params
end
- def execute(skip_authorization: false)
+ def execute
deployments = project.deployments
deployments =
if ref
@@ -36,13 +36,9 @@ class EnvironmentsFinder
end
end
- unless skip_authorization
- environments.select! do |environment|
- Ability.allowed?(current_user, :read_environment, environment)
- end
+ environments.select do |environment|
+ Ability.allowed?(current_user, :read_environment, environment)
end
-
- environments
end
private