lib/Endpoint.js
function(parentAcl) {
    var selfAndBelow = parentAcl.selfAndBelow
    if(selfAndBelow) {
      if(typeof(selfAndBelow) === 'boolean') {
        return function(user, permission, env) { return parentAcl.hasPermission(user, permission, env) }
      } else if(typeof(selfAndBelow) === 'function') {
        return selfAndBelow
      } else if(selfAndBelow in parentAcl.permissionDefinitions) {
        return function(user, permission, env) { return parentAcl.hasPermission(user, selfAndBelow, env) }
      } else {
        throw Error("Unexpected value for selfAndBelow: "+JSON.stringify(parentAcl))
      }
    }
    return null
  }
function(parentAcl) {
    var selfAndBelow = parentAcl.selfAndBelow
    if(selfAndBelow) {
      if(typeof(selfAndBelow) === 'boolean') {
        return function(user, permission, env) { return parentAcl.hasPermission(user, permission, env) }
      } else if(typeof(selfAndBelow) === 'function') {
        return selfAndBelow
      } else if(selfAndBelow in parentAcl.permissionDefinitions) {
        return function(user, permission, env) { return parentAcl.hasPermission(user, selfAndBelow, env) }
      } else {
        throw Error("Unexpected value for selfAndBelow: "+JSON.stringify(parentAcl))
      }
    }
    return null
  }
function ( parentAcl ) { var selfAndBelow = parentAcl . selfAndBelow if ( selfAndBelow ) { if ( typeof ( selfAndBelow ) === 'boolean' ) { return function ( user , permission , env ) { return parentAcl . hasPermission ( user , permission , env ) } } else if ( typeof ( selfAndBelow ) === 'function' ) { return selfAndBelow } else if ( selfAndBelow in parentAcl . permissionDefinitions ) { return function ( user , permission , env ) { return parentAcl . hasPermission ( user , selfAndBelow , env ) } } else { throw Error ( "Unexpected value for selfAndBelow: " + JSON . stringify ( parentAcl ) ) } } return null }
***************************************************************************
@method _selfAndBelowFn
@description Generates a single ``selfAndBelow`` function to be used by an
ACL from the various ``selfAndBelow`` definition styles
@param {carbond.security.Acl} parentAcl -- The parent endpoint's ACL
@returns {Function?}
***************************************************************************