move s3 related constants from package http to s3_constants

This commit is contained in:
chrislu
2022-05-30 22:57:41 -07:00
parent f4a6da6cb2
commit 27732ecfa4
15 changed files with 165 additions and 170 deletions

View File

@@ -24,7 +24,6 @@ import (
"crypto/sha256"
"encoding/hex"
"errors"
xhttp "github.com/chrislusf/seaweedfs/weed/s3api/http"
"github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"github.com/chrislusf/seaweedfs/weed/s3api/s3err"
"hash"
@@ -92,7 +91,7 @@ func (iam *IdentityAccessManagement) calculateSeedSignature(r *http.Request) (cr
return nil, "", "", time.Time{}, s3err.ErrInvalidAccessKeyID
}
bucket, object := xhttp.GetBucketAndObject(r)
bucket, object := s3_constants.GetBucketAndObject(r)
if !identity.canDo(s3_constants.ACTION_WRITE, bucket, object) {
errCode = s3err.ErrAccessDenied
return