aboutsummaryrefslogtreecommitdiff
path: root/weed/iamapi/iamapi_management_handlers.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2023-09-22 02:07:04 +0500
committerGitHub <noreply@github.com>2023-09-21 14:07:04 -0700
commit750a0ba1b2677c9b9bc9f0a1073a72a923e9a5f3 (patch)
tree8ff63a201d6be6ee8d570f7c4c9b0dc2a9dab120 /weed/iamapi/iamapi_management_handlers.go
parent8b2c39f2c06be2ec5c5b3ca93a87f134e46de219 (diff)
downloadseaweedfs-750a0ba1b2677c9b9bc9f0a1073a72a923e9a5f3.tar.xz
seaweedfs-750a0ba1b2677c9b9bc9f0a1073a72a923e9a5f3.zip
[iam] Replace action read/write to readAcp/writeAcp for handlers with acl (#4858)
Replace action read/write to readAcp/writeAcp for handlers with acl query https://github.com/seaweedfs/seaweedfs/issues/4519 Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
Diffstat (limited to 'weed/iamapi/iamapi_management_handlers.go')
-rw-r--r--weed/iamapi/iamapi_management_handlers.go26
1 files changed, 18 insertions, 8 deletions
diff --git a/weed/iamapi/iamapi_management_handlers.go b/weed/iamapi/iamapi_management_handlers.go
index 6a8a1b3d3..be9e4f874 100644
--- a/weed/iamapi/iamapi_management_handlers.go
+++ b/weed/iamapi/iamapi_management_handlers.go
@@ -21,14 +21,16 @@ import (
)
const (
- charsetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
- charset = charsetUpper + "abcdefghijklmnopqrstuvwxyz/"
- policyDocumentVersion = "2012-10-17"
- StatementActionAdmin = "*"
- StatementActionWrite = "Put*"
- StatementActionRead = "Get*"
- StatementActionList = "List*"
- StatementActionTagging = "Tagging*"
+ charsetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+ charset = charsetUpper + "abcdefghijklmnopqrstuvwxyz/"
+ policyDocumentVersion = "2012-10-17"
+ StatementActionAdmin = "*"
+ StatementActionWrite = "Put*"
+ StatementActionWriteAcp = "PutBucketAcl"
+ StatementActionRead = "Get*"
+ StatementActionReadAcp = "GetBucketAcl"
+ StatementActionList = "List*"
+ StatementActionTagging = "Tagging*"
)
var (
@@ -44,8 +46,12 @@ func MapToStatementAction(action string) string {
return s3_constants.ACTION_ADMIN
case StatementActionWrite:
return s3_constants.ACTION_WRITE
+ case StatementActionWriteAcp:
+ return s3_constants.ACTION_WRITE_ACP
case StatementActionRead:
return s3_constants.ACTION_READ
+ case StatementActionReadAcp:
+ return s3_constants.ACTION_READ_ACP
case StatementActionList:
return s3_constants.ACTION_LIST
case StatementActionTagging:
@@ -61,8 +67,12 @@ func MapToIdentitiesAction(action string) string {
return StatementActionAdmin
case s3_constants.ACTION_WRITE:
return StatementActionWrite
+ case s3_constants.ACTION_WRITE_ACP:
+ return StatementActionWriteAcp
case s3_constants.ACTION_READ:
return StatementActionRead
+ case s3_constants.ACTION_READ_ACP:
+ return StatementActionReadAcp
case s3_constants.ACTION_LIST:
return StatementActionList
case s3_constants.ACTION_TAGGING: