mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 13:58:24 +01:00
fix
This commit is contained in:
1 parent
c4eb2838c0
commit
c4e4552e73
1 file changed
+2
-2
@@ -30,8 +30,8 @@ func (h *S3TablesHandler) handleCreateTableBucket(w http.ResponseWriter, r *http
|
|||||||
identityActions := getIdentityActions(r)
|
identityActions := getIdentityActions(r)
|
||||||
identityPolicyNames := getIdentityPolicyNames(r)
|
identityPolicyNames := getIdentityPolicyNames(r)
|
||||||
if h.shouldUseIAM(r, identityActions, identityPolicyNames) {
|
if h.shouldUseIAM(r, identityActions, identityPolicyNames) {
|
||||||
sessionToken := extractSessionToken(r)
|
allowed, err := h.authorizeIAMAction(r, identityPolicyNames, "CreateTableBucket", h.generateTableBucketARN(principal, req.Name), fmt.Sprintf("arn:aws:s3:::%s", req.Name))
|
||||||
if !h.authorizeIAMAction(r, identityPolicyNames, "CreateTableBucket", h.generateTableBucketARN(principal, req.Name), fmt.Sprintf("arn:aws:s3:::%s", req.Name)) {
|
if err != nil || !allowed {
|
||||||
h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets")
|
h.writeError(w, http.StatusForbidden, ErrCodeAccessDenied, "not authorized to create table buckets")
|
||||||
return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets")
|
return NewAuthError("CreateTableBucket", principal, "not authorized to create table buckets")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user