Skip to content

Commit 54c05bc

Browse files
committed
handle AccessDenied error when checking if external s3 support versions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
1 parent d2d408b commit 54c05bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/files_external/lib/Lib/Storage/AmazonS3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ protected function getVersioningStatusFromBucket(): bool {
744744
return $result->get('Status') === 'Enabled';
745745
} catch (S3Exception $s3Exception) {
746746
// This is needed for compatibility with Storj gateway which does not support versioning yet
747-
if ($s3Exception->getAwsErrorCode() === 'NotImplemented') {
747+
if ($s3Exception->getAwsErrorCode() === 'NotImplemented' || $s3Exception->getAwsErrorCode() === 'AccessDenied') {
748748
return false;
749749
}
750750
throw $s3Exception;

0 commit comments

Comments
 (0)