]> source.dussan.org Git - nextcloud-server.git/commitdiff
handle AccessDenied error when checking if external s3 support versions 33280/head
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 19 Jul 2022 14:20:44 +0000 (16:20 +0200)
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>
Thu, 28 Jul 2022 09:20:12 +0000 (09:20 +0000)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
apps/files_external/lib/Lib/Storage/AmazonS3.php

index 6ebbed33a873100fb141b3edf5534a280fffeae3..d5b8eff6fe5a142f707e1611dd730bf77aa52e1e 100644 (file)
@@ -744,7 +744,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
                        return $result->get('Status') === 'Enabled';
                } catch (S3Exception $s3Exception) {
                        // This is needed for compatibility with Storj gateway which does not support versioning yet
-                       if ($s3Exception->getAwsErrorCode() === 'NotImplemented') {
+                       if ($s3Exception->getAwsErrorCode() === 'NotImplemented' || $s3Exception->getAwsErrorCode() === 'AccessDenied') {
                                return false;
                        }
                        throw $s3Exception;