diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /lib/api/job_artifacts.rb | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'lib/api/job_artifacts.rb')
-rw-r--r-- | lib/api/job_artifacts.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb index 28737f61f61..3dec0a29181 100644 --- a/lib/api/job_artifacts.rb +++ b/lib/api/job_artifacts.rb @@ -45,6 +45,7 @@ module API requires :job, type: String, desc: 'The name for the job' requires :artifact_path, type: String, desc: 'Artifact path' end + route_setting :authentication, job_token_allowed: true get ':id/jobs/artifacts/:ref_name/raw/*artifact_path', format: false, requirements: { ref_name: /.+/ } do @@ -84,13 +85,14 @@ module API requires :job_id, type: Integer, desc: 'The ID of a job' requires :artifact_path, type: String, desc: 'Artifact path' end + route_setting :authentication, job_token_allowed: true get ':id/jobs/:job_id/artifacts/*artifact_path', format: false do authorize_download_artifacts! build = find_build!(params[:job_id]) authorize_read_job_artifacts!(build) - not_found! unless build.artifacts? + not_found! unless build.available_artifacts? path = Gitlab::Ci::Build::Artifacts::Path .new(params[:artifact_path]) |