Skip to content

Commit

Permalink
(bug) #content_type_whitelist is instead by #content_type_allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
gnepud committed Mar 11, 2024
1 parent f07164a commit 523de4f
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 32 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/custom_assets_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/event_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/event_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/import_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/machine_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/machine_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/plan_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/product_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/product_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/project_cao_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def base_store_dir

# 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
4 changes: 2 additions & 2 deletions app/uploaders/project_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/space_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/space_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/supporting_document_file_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/training_image_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ def base_store_dir

# 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

Expand Down
4 changes: 2 additions & 2 deletions app/uploaders/user_avatar_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def base_store_dir

# 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

Expand Down

0 comments on commit 523de4f

Please sign in to comment.