diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eefdc415..f74c134c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Fix a bug: set settlement by cash by default for local payment mean - updates translations +- #content_type_whitelist is instead by #content_type_allowlist +- #extension_whitelist is instead by #extension_allowlist - [TODO DEPLOY] `rails fablab:setup:build_accounting_lines` ## v6.3.15 2024 February 29 diff --git a/app/uploaders/custom_assets_uploader.rb b/app/uploaders/custom_assets_uploader.rb index 3fc789cd7..ad783434a 100644 --- a/app/uploaders/custom_assets_uploader.rb +++ b/app/uploaders/custom_assets_uploader.rb @@ -48,11 +48,11 @@ class CustomAssetsUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf png jpeg jpg ico] end - def content_type_whitelist + def content_type_allowlist [%r{image/}, 'application/pdf'] end diff --git a/app/uploaders/event_file_uploader.rb b/app/uploaders/event_file_uploader.rb index 43752a117..35e2419d8 100644 --- a/app/uploaders/event_file_uploader.rb +++ b/app/uploaders/event_file_uploader.rb @@ -41,11 +41,11 @@ class EventFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf] end - def content_type_whitelist + def content_type_allowlist %w[application/pdf] end diff --git a/app/uploaders/event_image_uploader.rb b/app/uploaders/event_image_uploader.rb index 90d8c965a..57a2ced7d 100644 --- a/app/uploaders/event_image_uploader.rb +++ b/app/uploaders/event_image_uploader.rb @@ -59,11 +59,11 @@ class EventImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/import_uploader.rb b/app/uploaders/import_uploader.rb index 34a7cbd73..486c3d062 100644 --- a/app/uploaders/import_uploader.rb +++ b/app/uploaders/import_uploader.rb @@ -22,11 +22,11 @@ class ImportUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[csv] end - def content_type_whitelist + def content_type_allowlist %w[text/csv] end diff --git a/app/uploaders/machine_file_uploader.rb b/app/uploaders/machine_file_uploader.rb index a7d212831..1b06ea4d5 100644 --- a/app/uploaders/machine_file_uploader.rb +++ b/app/uploaders/machine_file_uploader.rb @@ -41,11 +41,11 @@ class MachineFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf] end - def content_type_whitelist + def content_type_allowlist %w[application/pdf] end diff --git a/app/uploaders/machine_image_uploader.rb b/app/uploaders/machine_image_uploader.rb index 0141731e1..4dcd0f5ea 100644 --- a/app/uploaders/machine_image_uploader.rb +++ b/app/uploaders/machine_image_uploader.rb @@ -51,11 +51,11 @@ class MachineImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/plan_file_uploader.rb b/app/uploaders/plan_file_uploader.rb index 680ef86af..983322e02 100644 --- a/app/uploaders/plan_file_uploader.rb +++ b/app/uploaders/plan_file_uploader.rb @@ -41,11 +41,11 @@ class PlanFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf png jpeg jpg] end - def content_type_whitelist + def content_type_allowlist [%r{image/}, 'application/pdf'] end diff --git a/app/uploaders/product_file_uploader.rb b/app/uploaders/product_file_uploader.rb index 1cee5d75c..316a8d9eb 100644 --- a/app/uploaders/product_file_uploader.rb +++ b/app/uploaders/product_file_uploader.rb @@ -46,11 +46,11 @@ class ProductFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf] end - def content_type_whitelist + def content_type_allowlist ['application/pdf'] end diff --git a/app/uploaders/product_image_uploader.rb b/app/uploaders/product_image_uploader.rb index caaa61799..90a522c36 100644 --- a/app/uploaders/product_image_uploader.rb +++ b/app/uploaders/product_image_uploader.rb @@ -39,11 +39,11 @@ class ProductImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png webp] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/project_cao_uploader.rb b/app/uploaders/project_cao_uploader.rb index 0b060198f..25ba2f0ce 100644 --- a/app/uploaders/project_cao_uploader.rb +++ b/app/uploaders/project_cao_uploader.rb @@ -23,11 +23,11 @@ class ProjectCaoUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist Setting.get('allowed_cad_extensions').split(' ') end - def content_type_whitelist + def content_type_allowlist Setting.get('allowed_cad_mime_types').split(' ') end end diff --git a/app/uploaders/project_image_uploader.rb b/app/uploaders/project_image_uploader.rb index 96e9d5bf6..aed3ffb8e 100644 --- a/app/uploaders/project_image_uploader.rb +++ b/app/uploaders/project_image_uploader.rb @@ -29,11 +29,11 @@ class ProjectImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/space_file_uploader.rb b/app/uploaders/space_file_uploader.rb index 1cdf2cf20..ccd30427c 100644 --- a/app/uploaders/space_file_uploader.rb +++ b/app/uploaders/space_file_uploader.rb @@ -41,11 +41,11 @@ class SpaceFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf] end - def content_type_whitelist + def content_type_allowlist %w[application/pdf] end diff --git a/app/uploaders/space_image_uploader.rb b/app/uploaders/space_image_uploader.rb index 4c5b57a29..ad9759f10 100644 --- a/app/uploaders/space_image_uploader.rb +++ b/app/uploaders/space_image_uploader.rb @@ -51,11 +51,11 @@ class SpaceImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/supporting_document_file_uploader.rb b/app/uploaders/supporting_document_file_uploader.rb index 9cc533a2d..a94dfbf00 100644 --- a/app/uploaders/supporting_document_file_uploader.rb +++ b/app/uploaders/supporting_document_file_uploader.rb @@ -47,11 +47,11 @@ class SupportingDocumentFileUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[pdf png jpeg jpg] end - def content_type_whitelist + def content_type_allowlist [%r{image/}, 'application/pdf'] end diff --git a/app/uploaders/training_image_uploader.rb b/app/uploaders/training_image_uploader.rb index 8d87b4025..8d6e4206d 100644 --- a/app/uploaders/training_image_uploader.rb +++ b/app/uploaders/training_image_uploader.rb @@ -51,11 +51,11 @@ class TrainingImageUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist [%r{image/}] end diff --git a/app/uploaders/user_avatar_uploader.rb b/app/uploaders/user_avatar_uploader.rb index 6c9f40ced..9841a0e69 100644 --- a/app/uploaders/user_avatar_uploader.rb +++ b/app/uploaders/user_avatar_uploader.rb @@ -55,11 +55,11 @@ class UserAvatarUploader < CarrierWave::Uploader::Base # Add a white list of extensions which are allowed to be uploaded. # For images you might use something like this: - def extension_whitelist + def extension_allowlist %w[jpg jpeg gif png] end - def content_type_whitelist + def content_type_allowlist %w[image/jpeg image/gif image/png] end