diff options
-rw-r--r-- | app/uploaders/object_storage.rb | 6 | ||||
-rw-r--r-- | spec/uploaders/object_storage_spec.rb | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/uploaders/object_storage.rb b/app/uploaders/object_storage.rb index dad6e85fb56..5f8b89f2a24 100644 --- a/app/uploaders/object_storage.rb +++ b/app/uploaders/object_storage.rb @@ -278,8 +278,12 @@ module ObjectStorage self.class.object_store_credentials end + # Set ACL of uploaded objects to not-public (fog-aws)[1] or no ACL at all + # (fog-google). Value is ignored by other supported backends (fog-aliyun, + # fog-openstack, fog-rackspace) + # [1]: https://github.com/fog/fog-aws/blob/daa50bb3717a462baf4d04d0e0cbfc18baacb541/lib/fog/aws/models/storage/file.rb#L152-L159 def fog_public - false + nil end def delete_migrated_file(migrated_file) diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb index 533e9d87ea6..9ce9a353913 100644 --- a/spec/uploaders/object_storage_spec.rb +++ b/spec/uploaders/object_storage_spec.rb @@ -375,7 +375,7 @@ describe ObjectStorage do describe '#fog_public' do subject { uploader.fog_public } - it { is_expected.to eq(false) } + it { is_expected.to eq(nil) } end describe '.workhorse_authorize' do |