diff options
author | Bastian Blank <waldi@debian.org> | 2019-03-29 23:54:44 +0100 |
---|---|---|
committer | Bastian Blank <waldi@debian.org> | 2019-03-30 14:55:33 +0100 |
commit | b82ccf2cbc074e36c78dd1e331c6745cb9b71349 (patch) | |
tree | a81e417dfd8ac9f087d833fab7ce72375001c6d3 /app/uploaders | |
parent | 50a1e01fa8959b08df8bfc18940f9310876873b3 (diff) | |
download | gitlab-ce-b82ccf2cbc074e36c78dd1e331c6745cb9b71349.tar.gz |
Don't try to set any ACL on uploaded objects
Set ACL of uploaded objects to not-public (fog-aws) or no ACL at all
(fog-google). Value is ignored by other supported backends (fog-aliyun,
fog-openstack, fog-rackspace)
This allows uploads to GCS with ACL support disabled.
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/object_storage.rb | 6 |
1 files changed, 5 insertions, 1 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) |