From 356091e28a50b4470b9323de495631fcc2355167 Mon Sep 17 00:00:00 2001 From: mattfoster7 <38736065+mattfoster7@users.noreply.github.com> Date: Mon, 10 Aug 2020 16:07:52 -0400 Subject: [PATCH 1/3] Update GoogleStorageAdapter.php --- src/GoogleStorageAdapter.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/GoogleStorageAdapter.php b/src/GoogleStorageAdapter.php index d5e6c9d..be25251 100755 --- a/src/GoogleStorageAdapter.php +++ b/src/GoogleStorageAdapter.php @@ -139,13 +139,14 @@ public function updateStream($path, $resource, Config $config) protected function getOptionsFromConfig(Config $config) { $options = []; - - if ($visibility = $config->get('visibility')) { - $options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility); - } else { - // if a file is created without an acl, it isn't accessible via the console - // we therefore default to private - $options['predefinedAcl'] = $this->getPredefinedAclForVisibility(AdapterInterface::VISIBILITY_PRIVATE); + if (!($this->bucket->info()['iamConfiguration']['uniformBucketLevelAccess']['enabled'] ?? false)) { + if ($visibility = $config->get('visibility')) { + $options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility); + } else { + // if a file is created without an acl, it isn't accessible via the console + // we therefore default to private + $options['predefinedAcl'] = $this->getPredefinedAclForVisibility(AdapterInterface::VISIBILITY_PRIVATE); + } } if ($metadata = $config->get('metadata')) { From c4daa6e4ed73dd2a9be1e213aff7ce9837ae16b5 Mon Sep 17 00:00:00 2001 From: mattfoster7 <38736065+mattfoster7@users.noreply.github.com> Date: Mon, 10 Aug 2020 16:24:23 -0400 Subject: [PATCH 2/3] Update GoogleStorageAdapter.php --- src/GoogleStorageAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GoogleStorageAdapter.php b/src/GoogleStorageAdapter.php index be25251..3547299 100755 --- a/src/GoogleStorageAdapter.php +++ b/src/GoogleStorageAdapter.php @@ -139,7 +139,7 @@ public function updateStream($path, $resource, Config $config) protected function getOptionsFromConfig(Config $config) { $options = []; - if (!($this->bucket->info()['iamConfiguration']['uniformBucketLevelAccess']['enabled'] ?? false)) { + if (empty($this->bucket->info()['iamConfiguration']['uniformBucketLevelAccess']['enabled']) { if ($visibility = $config->get('visibility')) { $options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility); } else { From 40a142a55149cfb198e6560c7c08695523c5ef03 Mon Sep 17 00:00:00 2001 From: mattfoster7 <38736065+mattfoster7@users.noreply.github.com> Date: Mon, 10 Aug 2020 16:38:33 -0400 Subject: [PATCH 3/3] Update GoogleStorageAdapter.php --- src/GoogleStorageAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GoogleStorageAdapter.php b/src/GoogleStorageAdapter.php index 3547299..f193752 100755 --- a/src/GoogleStorageAdapter.php +++ b/src/GoogleStorageAdapter.php @@ -139,7 +139,7 @@ public function updateStream($path, $resource, Config $config) protected function getOptionsFromConfig(Config $config) { $options = []; - if (empty($this->bucket->info()['iamConfiguration']['uniformBucketLevelAccess']['enabled']) { + if (empty($this->bucket->info()['iamConfiguration']['uniformBucketLevelAccess']['enabled'])) { if ($visibility = $config->get('visibility')) { $options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility); } else {