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:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/serializers/pipeline_details_entity.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/serializers/pipeline_details_entity.rb')
-rw-r--r--app/serializers/pipeline_details_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/pipeline_details_entity.rb b/app/serializers/pipeline_details_entity.rb
index 50efa9ea15d..e53fa7873ac 100644
--- a/app/serializers/pipeline_details_entity.rb
+++ b/app/serializers/pipeline_details_entity.rb
@@ -11,6 +11,10 @@ class PipelineDetailsEntity < PipelineEntity
expose :artifacts do |pipeline, options|
rel = pipeline.downloadable_artifacts
+ if Feature.enabled?(:non_public_artifacts, type: :development)
+ rel = rel.select { |artifact| can?(request.current_user, :read_job_artifacts, artifact.job) }
+ end
+
BuildArtifactEntity.represent(rel, options)
end
expose :manual_actions, using: BuildActionEntity