flysystem-google-cloud-storage icon indicating copy to clipboard operation
flysystem-google-cloud-storage copied to clipboard

Is there a reason to explicitly set the visibility if not passed?

Open phroggyy opened this issue 6 years ago • 7 comments

In the following lines, we check if the visibility has been specified, and if it hasn't we default to private. https://github.com/Superbalist/flysystem-google-cloud-storage/blob/master/src/GoogleStorageAdapter.php#L143-L149

Is there any reason we need to default to anything at all? If we specify nothing, the default object ACL of the bucket should be applied (by default private, visible to owner). This seems like more desirable behaviour imo – if users specify a default object ACL on their buckets, I believe it's expected that it will apply to uploaded files.

If there is a good reason this is being done, let's keep it but make it clear in the documentation that we're applying private visibility by default.

phroggyy avatar Feb 26 '19 14:02 phroggyy

Also note that setting ACLs isn't supported by the new Bucket Only Policy, and causes an error when trying to upload, which makes the driver incompatible with buckets using it.

alexking avatar Apr 12 '19 18:04 alexking

Could you have a look at PR https://github.com/Superbalist/flysystem-google-cloud-storage/pull/57 and see whether it addresses the issue? If so we can clean it up and get it merged

nicja avatar Apr 15 '19 10:04 nicja

That looks like it would do it indeed @nicja

phroggyy avatar Apr 15 '19 13:04 phroggyy

Thanks, I'm working on getting that merged

nicja avatar Apr 18 '19 14:04 nicja

Would that be merged anytime soon?

stepanselyuk avatar Jun 27 '19 16:06 stepanselyuk

I'm waiting on @mgriego to update #57 so that the tests pass, alternatively if someone else could raise a similar PR that would also help

nicja avatar Jun 28 '19 08:06 nicja

I've gone down the path of manually updating what I needed to get this done: https://www.kublermdk.com/2022/01/29/googlecloud-flysystem-tweaks-to-support-uniform-bucket-level-access/

I assume others of you are doing the same given this PR has been sitting around for years.

kublermdk avatar Jan 28 '22 15:01 kublermdk