mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Remove s3:ListObjects policy action to be in sync with AWS-S3 (#5875)
This commit is contained in:
committed by
Nitish Tiwari
parent
7f207156ec
commit
0ad0969d61
@@ -183,24 +183,6 @@ func checkRequestAuthType(ctx context.Context, r *http.Request, action policy.Ac
|
||||
return ErrNone
|
||||
}
|
||||
|
||||
// As policy.ListBucketAction and policy.ListObjectsAction are same but different names,
|
||||
// policy.ListBucketAction is used across the code but user may used policy.ListObjectsAction
|
||||
// in bucket policy to denote the same. In below try again with policy.ListObjectsAction.
|
||||
if action != policy.ListBucketAction {
|
||||
return ErrAccessDenied
|
||||
}
|
||||
|
||||
if globalPolicySys.IsAllowed(policy.Args{
|
||||
AccountName: accountName,
|
||||
Action: policy.ListObjectsAction,
|
||||
BucketName: bucketName,
|
||||
ConditionValues: getConditionValues(r, locationConstraint),
|
||||
IsOwner: isOwner,
|
||||
ObjectName: objectName,
|
||||
}) {
|
||||
return ErrNone
|
||||
}
|
||||
|
||||
return ErrAccessDenied
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user