fix: Removed the bucket ACL owner check for admin and root users

This commit is contained in:
jonaustin09
2024-07-17 09:39:00 -04:00
parent ed9a10a337
commit 23a40d86a2
4 changed files with 57 additions and 6 deletions

View File

@@ -1361,7 +1361,7 @@ func (c S3ApiController) PutBucketActions(ctx *fiber.Ctx) error {
}
}
updAcl, err := auth.UpdateACL(input, parsedAcl, c.iam)
updAcl, err := auth.UpdateACL(input, parsedAcl, c.iam, acct.Role == auth.RoleAdmin)
if err != nil {
return SendResponse(ctx, err,
&MetaOpts{
@@ -1448,7 +1448,7 @@ func (c S3ApiController) PutBucketActions(ctx *fiber.Ctx) error {
ID: &acct.Access,
}},
ACL: types.BucketCannedACL(acl),
}, defACL, c.iam)
}, defACL, c.iam, acct.Role == auth.RoleAdmin)
if err != nil {
return SendResponse(ctx, err,
&MetaOpts{