lib/FSi/Component/ACL/ACL.php
protected function searchACEs($roleId, $resourceId, $permissionId, array $params = array(), $level = 0)
    {
        if (!isset($this->ACEs[$roleId][$resourceId][$permissionId])) {
            return null;
        } else {
            $allowedAny = null;
            foreach ($this->ACEs[$roleId][$resourceId][$permissionId] as $ace) {
                $allowed = $ace->isAllowed($params);
                if (isset($this->logger)) {
                    $this->logger->addRecord(Logger::INFO, sprintf(" %s%s ACE (class: %s) {resource: %s (class: %s), role: %s (class: %s), permission: %s (class: %s)}",
                        str_repeat('  ', $level),
                        isset($allowed)?($allowed?'Access granted by':'Access denied by'):'No decision from',
                        $ace,
                        $this->stringify($ace->getResource()),
                        get_class($ace->getResource()),
                        $this->stringify($ace->getRole()),
                        get_class($ace->getRole()),
                        $this->stringify($this->permissions[$permissionId]),
                        get_class($this->permissions[$permissionId])
                    ));
                }
                if (isset($allowed)) {
                    if (!$allowed) {
                        return false;
                    } else {
                        $allowedAny = true;
                    }
                }
            }
            return $allowedAny;
        }
    }
protected function searchACEs($roleId, $resourceId, $permissionId, array $params = array(), $level = 0)
    {
        if (!isset($this->ACEs[$roleId][$resourceId][$permissionId])) {
            return null;
        } else {
            $allowedAny = null;
            foreach ($this->ACEs[$roleId][$resourceId][$permissionId] as $ace) {
                $allowed = $ace->isAllowed($params);
                if (isset($this->logger)) {
                    $this->logger->addRecord(Logger::INFO, sprintf(" %s%s ACE (class: %s) {resource: %s (class: %s), role: %s (class: %s), permission: %s (class: %s)}",
                        str_repeat('  ', $level),
                        isset($allowed)?($allowed?'Access granted by':'Access denied by'):'No decision from',
                        $ace,
                        $this->stringify($ace->getResource()),
                        get_class($ace->getResource()),
                        $this->stringify($ace->getRole()),
                        get_class($ace->getRole()),
                        $this->stringify($this->permissions[$permissionId]),
                        get_class($this->permissions[$permissionId])
                    ));
                }
                if (isset($allowed)) {
                    if (!$allowed) {
                        return false;
                    } else {
                        $allowedAny = true;
                    }
                }
            }
            return $allowedAny;
        }
    }
protected function searchACEs ( $ roleId , $ resourceId , $ permissionId , array $ params = array ( ) , $ level = 0 ) { if ( ! isset ( $ this -> ACEs [ $ roleId ] [ $ resourceId ] [ $ permissionId ] ) ) { return null ; } else { $ allowedAny = null ; foreach ( $ this -> ACEs [ $ roleId ] [ $ resourceId ] [ $ permissionId ] as $ ace ) { $ allowed = $ ace -> isAllowed ( $ params ) ; if ( isset ( $ this -> logger ) ) { $ this -> logger -> addRecord ( Logger :: INFO , sprintf ( " %s%s ACE (class: %s) {resource: %s (class: %s), role: %s (class: %s), permission: %s (class: %s)}" , str_repeat ( '  ' , $ level ) , isset ( $ allowed ) ? ( $ allowed ? 'Access granted by' : 'Access denied by' ) : 'No decision from' , $ ace , $ this -> stringify ( $ ace -> getResource ( ) ) , get_class ( $ ace -> getResource ( ) ) , $ this -> stringify ( $ ace -> getRole ( ) ) , get_class ( $ ace -> getRole ( ) ) , $ this -> stringify ( $ this -> permissions [ $ permissionId ] ) , get_class ( $ this -> permissions [ $ permissionId ] ) ) ) ; } if ( isset ( $ allowed ) ) { if ( ! $ allowed ) { return false ; } else { $ allowedAny = true ; } } } return $ allowedAny ; } }
Search ACEs associated with specified role, resource and permission.

This method returns true or false only if specified role has directly granted or revoked specified permission to specified
resource. Otherwise it returns null.

@param string $roleId
@param string $resourceId
@param string $permissionId
@param array $params
@return bool|null
Search ACEs associated with specified role resource and permission .