Commit 27bf3056 authored by Charles Sam Dilip's avatar Charles Sam Dilip Committed by charles

Rename Import Uploader Extension Allowlist Constant

Changed the constants in the files to culturally sensitive language.

Changelog: changed
parent 9c44e9d0
......@@ -38,6 +38,6 @@ module WorkhorseAuthorization
end
def file_extension_whitelist
ImportExportUploader::EXTENSION_WHITELIST
ImportExportUploader::EXTENSION_ALLOWLIST
end
end
......@@ -2,6 +2,6 @@
module BulkImports
class ExportUploader < ImportExportUploader
EXTENSION_WHITELIST = %w[ndjson.gz].freeze
EXTENSION_ALLOWLIST = %w[ndjson.gz].freeze
end
end
# frozen_string_literal: true
class ImportExportUploader < AttachmentUploader
EXTENSION_WHITELIST = %w[tar.gz gz].freeze
EXTENSION_ALLOWLIST = %w[tar.gz gz].freeze
def self.workhorse_local_upload_path
File.join(options.storage_path, 'uploads', TMP_UPLOAD_PATH)
end
def extension_whitelist
EXTENSION_WHITELIST
EXTENSION_ALLOWLIST
end
def move_to_cache
......
......@@ -5,7 +5,7 @@ module API
module FileUploadHelpers
def file_is_valid?
filename = params[:file]&.original_filename
filename && ImportExportUploader::EXTENSION_WHITELIST.include?(File.extname(filename).delete('.'))
filename && ImportExportUploader::EXTENSION_ALLOWLIST.include?(File.extname(filename).delete('.'))
end
def validate_file!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment