From d8519da411aef6b37e526ea79975c706dfc75aa8 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 13 Nov 2025 15:57:51 -0800 Subject: [PATCH] simplify --- weed/s3api/s3_action_resolver.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/weed/s3api/s3_action_resolver.go b/weed/s3api/s3_action_resolver.go index 7df147412..83431424c 100644 --- a/weed/s3api/s3_action_resolver.go +++ b/weed/s3api/s3_action_resolver.go @@ -262,9 +262,7 @@ func resolveObjectLevelAction(method string, baseAction string) string { func resolveBucketLevelAction(method string, baseAction string) string { switch method { case http.MethodGet, http.MethodHead: - if baseAction == s3_constants.ACTION_LIST { - return s3_constants.S3_ACTION_LIST_BUCKET - } else if baseAction == s3_constants.ACTION_READ { + if baseAction == s3_constants.ACTION_LIST || baseAction == s3_constants.ACTION_READ { return s3_constants.S3_ACTION_LIST_BUCKET }