mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
(bug) #content_type_whitelist is instead by #content_type_allowlist
This commit is contained in:
parent
f07164afb2
commit
523de4f3f7
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
- Fix a bug: set settlement by cash by default for local payment mean
|
- Fix a bug: set settlement by cash by default for local payment mean
|
||||||
- updates translations
|
- 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`
|
- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines`
|
||||||
|
|
||||||
## v6.3.15 2024 February 29
|
## v6.3.15 2024 February 29
|
||||||
|
@ -48,11 +48,11 @@ class CustomAssetsUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf png jpeg jpg ico]
|
%w[pdf png jpeg jpg ico]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}, 'application/pdf']
|
[%r{image/}, 'application/pdf']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ class EventFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf]
|
%w[pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
%w[application/pdf]
|
%w[application/pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -59,11 +59,11 @@ class EventImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,11 +22,11 @@ class ImportUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[csv]
|
%w[csv]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
%w[text/csv]
|
%w[text/csv]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ class MachineFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf]
|
%w[pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
%w[application/pdf]
|
%w[application/pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ class MachineImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ class PlanFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf png jpeg jpg]
|
%w[pdf png jpeg jpg]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}, 'application/pdf']
|
[%r{image/}, 'application/pdf']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ class ProductFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf]
|
%w[pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
['application/pdf']
|
['application/pdf']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -39,11 +39,11 @@ class ProductImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png webp]
|
%w[jpg jpeg gif png webp]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@ class ProjectCaoUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
Setting.get('allowed_cad_extensions').split(' ')
|
Setting.get('allowed_cad_extensions').split(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
Setting.get('allowed_cad_mime_types').split(' ')
|
Setting.get('allowed_cad_mime_types').split(' ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -29,11 +29,11 @@ class ProjectImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ class SpaceFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf]
|
%w[pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
%w[application/pdf]
|
%w[application/pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ class SpaceImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,11 +47,11 @@ class SupportingDocumentFileUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[pdf png jpeg jpg]
|
%w[pdf png jpeg jpg]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}, 'application/pdf']
|
[%r{image/}, 'application/pdf']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ class TrainingImageUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
[%r{image/}]
|
[%r{image/}]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ class UserAvatarUploader < CarrierWave::Uploader::Base
|
|||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_whitelist
|
def extension_allowlist
|
||||||
%w[jpg jpeg gif png]
|
%w[jpg jpeg gif png]
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type_whitelist
|
def content_type_allowlist
|
||||||
%w[image/jpeg image/gif image/png]
|
%w[image/jpeg image/gif image/png]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user