Disable artifact validation for download action
This commit is contained in:
parent
99127e6a15
commit
22d1ec661d
2 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
|
||||||
before_action :authorize_update_build!, only: [:keep]
|
before_action :authorize_update_build!, only: [:keep]
|
||||||
before_action :extract_ref_name_and_path
|
before_action :extract_ref_name_and_path
|
||||||
before_action :set_request_format, only: [:file]
|
before_action :set_request_format, only: [:file]
|
||||||
before_action :validate_artifacts!
|
before_action :validate_artifacts!, except: [:download]
|
||||||
before_action :entry, only: [:file]
|
before_action :entry, only: [:file]
|
||||||
|
|
||||||
def download
|
def download
|
||||||
|
@ -102,7 +102,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
|
||||||
# rubocop: enable CodeReuse/ActiveRecord
|
# rubocop: enable CodeReuse/ActiveRecord
|
||||||
|
|
||||||
def artifacts_file
|
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
|
end
|
||||||
|
|
||||||
def entry
|
def entry
|
||||||
|
|
|
@ -6,10 +6,10 @@ class Projects::BuildArtifactsController < Projects::ApplicationController
|
||||||
|
|
||||||
before_action :authorize_read_build!
|
before_action :authorize_read_build!
|
||||||
before_action :extract_ref_name_and_path
|
before_action :extract_ref_name_and_path
|
||||||
before_action :validate_artifacts!
|
before_action :validate_artifacts!, except: [:download]
|
||||||
|
|
||||||
def download
|
def download
|
||||||
redirect_to download_project_job_artifacts_path(project, job)
|
redirect_to download_project_job_artifacts_path(project, job, params: request.query_parameters)
|
||||||
end
|
end
|
||||||
|
|
||||||
def browse
|
def browse
|
||||||
|
|
Loading…
Reference in a new issue