Fix user archive takeout when using OpenStack Swift or S3 providers with no ACL support (#24200)

This commit is contained in:
Claire 2023-03-27 17:07:37 +02:00
parent 3c82c4e780
commit ae64c5b7ec
3 changed files with 7 additions and 2 deletions

View file

@ -17,6 +17,6 @@
class Backup < ApplicationRecord
belongs_to :user, inverse_of: :backups
has_attached_file :dump, s3_permissions: 'private'
has_attached_file :dump, s3_permissions: ->(*) { ENV['S3_PERMISSION'] == '' ? nil : 'private' }
do_not_validate_attachment_file_type :dump
end