fix: some cleanup in posix, router and acl

This commit is contained in:
jonaustin09
2023-09-08 12:46:50 -04:00
parent 23b5eb30ed
commit 35fe6d8dee
3 changed files with 14 additions and 5 deletions

View File

@@ -105,7 +105,6 @@ func UpdateACL(input *s3.PutBucketAclInput, acl ACL, iam IAMService) ([]byte, er
if *input.GrantFullControl != "" {
fullControlList = splitUnique(*input.GrantFullControl, ",")
fmt.Println(fullControlList)
for _, str := range fullControlList {
grantees = append(grantees, Grantee{Access: str, Permission: "FULL_CONTROL"})
}

View File

@@ -413,7 +413,6 @@ func loadUserMetaData(path string, m map[string]string) (contentType, contentEnc
if err != nil || len(ents) == 0 {
return
}
fmt.Println(ents)
for _, e := range ents {
if !isValidMeta(e) {
continue
@@ -426,7 +425,6 @@ func loadUserMetaData(path string, m map[string]string) (contentType, contentEnc
if err != nil {
continue
}
fmt.Println(b)
m[strings.TrimPrefix(e, fmt.Sprintf("user.%v.", metaHdr))] = string(b)
}
@@ -1168,7 +1166,6 @@ func (p *Posix) GetObject(_ context.Context, input *s3.GetObjectInput, writer io
userMetaData := make(map[string]string)
contentType, contentEncoding := loadUserMetaData(objPath, userMetaData)
fmt.Println(userMetaData)
b, err := xattr.Get(objPath, etagkey)
etag := string(b)

View File

@@ -44,7 +44,7 @@ func (sa *S3ApiRouter) Init(app *fiber.App, be backend.Backend, iam auth.IAMServ
// ListBuckets action
app.Get("/", s3ApiController.ListBuckets)
// PutBucket action
// CreateBucket action
// PutBucketAcl action
app.Put("/:bucket", s3ApiController.PutBucketActions)
@@ -53,6 +53,7 @@ func (sa *S3ApiRouter) Init(app *fiber.App, be backend.Backend, iam auth.IAMServ
// HeadBucket
app.Head("/:bucket", s3ApiController.HeadBucket)
// GetBucketAcl action
// ListMultipartUploads action
// ListObjects action
@@ -61,22 +62,34 @@ func (sa *S3ApiRouter) Init(app *fiber.App, be backend.Backend, iam auth.IAMServ
// HeadObject action
app.Head("/:bucket/:key/*", s3ApiController.HeadObject)
// GetObjectAcl action
// GetObject action
// ListObjectParts action
// GetTags action
// ListParts action
// GetObjectAttributes action
app.Get("/:bucket/:key/*", s3ApiController.GetActions)
// DeleteObject action
// AbortMultipartUpload action
// RemoveTags action
app.Delete("/:bucket/:key/*", s3ApiController.DeleteActions)
// DeleteObjects action
app.Post("/:bucket", s3ApiController.DeleteObjects)
// CompleteMultipartUpload action
// CreateMultipartUpload
// RestoreObject action
// SelectObjectContent action
app.Post("/:bucket/:key/*", s3ApiController.CreateActions)
// CopyObject action
// PutObject action
// UploadPart action
// UploadPartCopy action
// SetTags action
// PutObjectAcl action
app.Put("/:bucket/:key/*", s3ApiController.PutActions)
}