From 6ba5167f5d89aabc294f4e6a6b77a10c678f3bbe Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Wed, 7 Jul 2021 17:58:53 +0300 Subject: [PATCH] [#125] Fixed acl rule Container must be public (basic acl) to enable bearer token. Signed-off-by: Denis Kirillov --- api/handler/put.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/handler/put.go b/api/handler/put.go index 71aa0f44f..73b5d0b95 100644 --- a/api/handler/put.go +++ b/api/handler/put.go @@ -20,6 +20,8 @@ const ( basicACLReadOnly = "public-read" basicACLPublic = "public-read-write" defaultPolicy = "REP 3" + + publicBasicRule = 0x0FFFFFFF ) func (h *handler) PutObjectHandler(w http.ResponseWriter, r *http.Request) { @@ -85,7 +87,7 @@ func (h *handler) CreateBucketHandler(w http.ResponseWriter, r *http.Request) { if val, ok := r.Header["X-Amz-Acl"]; ok { p.ACL, err = parseBasicACL(val[0]) } else { - p.ACL = acl.PrivateBasicRule + p.ACL = publicBasicRule } if err != nil {