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:
authorMatija Čupić <matteeyah@gmail.com>2018-10-16 16:01:48 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-10-16 16:01:48 +0300
commit22d1ec661d478b46e4e667316303803973f8d5fb (patch)
tree7faad970b0d8de45a5ea5f6b68c31ba260cb0b5c /app/controllers/projects/artifacts_controller.rb
parent99127e6a15d9635f3d4946d520cc9c313ada1ce1 (diff)
Disable artifact validation for download action
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r--app/controllers/projects/artifacts_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index d0f59aa8162..312e256ea6c 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -10,7 +10,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
before_action :authorize_update_build!, only: [:keep]
before_action :extract_ref_name_and_path
before_action :set_request_format, only: [:file]
- before_action :validate_artifacts!
+ before_action :validate_artifacts!, except: [:download]
before_action :entry, only: [:file]
def download
@@ -102,7 +102,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
# rubocop: enable CodeReuse/ActiveRecord
def artifacts_file
- @artifacts_file ||= build.artifacts_file_for_type(params[:file_type] || :archive)
+ @artifacts_file ||= build&.artifacts_file_for_type(params[:file_type] || :archive)
end
def entry