boolean allowed = false;
if (bucket.hasBucketAttributes()) {
BucketAttributes bucketAttributes = bucket.getBucketAttributes();
if (bucketAttributes.hasAclRead()) {
StorageAcl acl = StorageAcl.parse(AclType.Read, bucketAttributes.getAclRead());
// TODO: Do we really care about referer?
String referer = "unknown";
// String referer = request.getHeader("Referer");
if (acl.isRefererAllowed(referer)) {
allowed = true;
}
}
}