function validateBucket(bucket, params, log, actionImplicitDenies = {}) {
    const { authInfo, preciseRequestType, request } = params;
    let requestType = params.requestType;
    if (bucketShield(bucket, requestType)) {
        log.debug('bucket is shielded from request', {
            requestType,
            method: 'validateBucket',
        });
        return errors.NoSuchBucket;
    }
    const canonicalID = authInfo.getCanonicalID();
    if (!Array.isArray(requestType)) {
        requestType = [requestType];
    }
    if (bucket.getOwner() !== canonicalID && requestType.some(type => onlyOwnerAllowed.includes(type))) {
        return errors.MethodNotAllowed;
    }
    if (!isBucketAuthorized(bucket, (preciseRequestType || requestType), canonicalID,
        authInfo, log, request, actionImplicitDenies)) {
        log.debug('access denied for user on bucket', { requestType });
        return errors.AccessDenied;
    }
    return null;
}
Validate that a bucket is accessible and authorized to the user,
return a specific error code otherwise

@param {BucketInfo} bucket - bucket info
@param {object} params - function parameters
@param {AuthInfo} params.authInfo - AuthInfo class instance, requester's info
@param {string} params.requestType - type of request
@param {string} [params.preciseRequestType] - precise type of request
@param {object} params.request - http request object
 @param {RequestLogger} log - request logger
@param {object} actionImplicitDenies - identity authorization results
@return {ArsenalError|null} returns a validation error, or null if validation OK
The following errors may be returned:
- NoSuchBucket: bucket is shielded
- MethodNotAllowed: requester is not bucket owner and asking for a
    bucket policy operation
- AccessDenied: bucket is not authorized