Compare commits

...

1 Commits

Author SHA1 Message Date
Will Toozs f47ee4f6ad
change position of ACL check 2023-12-18 16:34:17 +01:00
1 changed files with 5 additions and 0 deletions

View File

@ -393,6 +393,11 @@ function isObjAuthorized(bucket, objectMD, requestTypesInput, canonicalID, authI
// 'bucketGet' covers listObjects and listMultipartUploads, bucket read actions
results[_requestType] = isBucketAuthorized(bucket, 'bucketGet', canonicalID, authInfo, log, request,
actionImplicitDenies);
// User is already authorized on the bucket for FULL_CONTROL or WRITE or
// bucket has canned ACL public-read-write
if ((parsedMethodName === 'objectPut' || parsedMethodName === 'objectDelete') && results[_requestType] === false) {
results[_requestType] = actionImplicitDenies[_requestType] === false;
}
return results[_requestType];
}
let requesterIsNotUser = true;