lib/security/ObjectAcl.js
function sanitize(value, user, filterSingleValue, filterArrays, acl) {
  var result = doSanitize(value, user, filterArrays, acl)
  if (typeof(value) === 'object' && result === undefined) {
    if (!filterSingleValue) {
      throw new Error("User unauthorized to see value") // XXX do we want to do this via exception?
    }
  }

  return result
}
function sanitize(value, user, filterSingleValue, filterArrays, acl) {
  var result = doSanitize(value, user, filterArrays, acl)
  if (typeof(value) === 'object' && result === undefined) {
    if (!filterSingleValue) {
      throw new Error("User unauthorized to see value") // XXX do we want to do this via exception?
    }
  }

  return result
}
*************************************************************************************************
@method sanitize
@description Processes values such that if there exist objects with acls that deny read access,
they will be forbidden or sanitized appropriately.

If the value is an array of Objects, and there exists an Object in the array that has
an __acl__ that denies read access, a 403 will be returned, unless filterArrayValues
is true, in which case such objects will be removed from the result array

If the value is an Object, and has an __acl__ that denies read access a 403 will be
returned unless filterSingleValie is true (used by insert for example). XXX?

If the value is an Object or array of Objects, all Objects returned will have properties
denited byu an __acl__ removed such that the Objects returned are sanitized of any
properties the user does not have permission to read
@param {xxx} value -- xxx
@param {xxx} user -- xxx
@param {xxx} filterSingleValue -- xxx
@param {xxx} filterArrays -- xxx
@param {xxx} acl -- xxx
@throws {Error} -- xxx
@returns {xxx} -- xxx