diff options
Diffstat (limited to 'app/serializers/pipeline_details_entity.rb')
-rw-r--r-- | app/serializers/pipeline_details_entity.rb | 4 |
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 |