summaryrefslogtreecommitdiff
path: root/app/models/environment_status.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 18:10:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-25 18:10:42 +0000
commita880341a7b3a164ba381620852cc3ea0777f67ad (patch)
treede7f7a09aee296eef7924cad7eb7ec2e9ea29ce0 /app/models/environment_status.rb
parenta8c1bc6f757ecacbc3481e52a3f4cefb6c6db5fd (diff)
downloadgitlab-ce-a880341a7b3a164ba381620852cc3ea0777f67ad.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/environment_status.rb')
-rw-r--r--app/models/environment_status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb
index 55ea4e2fe18..07c0983f239 100644
--- a/app/models/environment_status.rb
+++ b/app/models/environment_status.rb
@@ -100,7 +100,7 @@ class EnvironmentStatus
def self.build_environments_status(mr, user, pipeline)
return [] unless pipeline
- pipeline.environments.includes(:project).available.map do |environment|
+ pipeline.environments_in_self_and_descendants.includes(:project).available.map do |environment|
next unless Ability.allowed?(user, :read_environment, environment)
EnvironmentStatus.new(pipeline.project, environment, mr, pipeline.sha)