lib/FSi/Component/ACL/ACL.php
protected function searchParentResourceACEs($roleId, $resourceId, $permissionId, array $params = array(), $level = 0)
    {
        $allowedAny = null;
        if (isset($this->resourcesParents[$resourceId]) && isset($this->roles[$roleId]) && isset($this->permissions[$permissionId])) {
            if (isset($this->logger)) {
                $this->logger->addRecord(Logger::DEBUG, sprintf("%sChecking if specified role has specified permission to any parent resource",
                    str_repeat('  ', $level)
                ));
            }
            foreach ($this->resourcesParents[$resourceId] as $parentResourceId => $parentResource) {
                $allowed = $this->searchACEs($roleId, $parentResourceId, $permissionId, $params, $level + 1);
                if (!isset($allowed)) {
                    $allowed = $this->searchParentResourceACEs($roleId, $parentResourceId, $permissionId, $params, $level + 1);
                }
                if (isset($allowed)) {
                    if (!$allowed) {
                        return $allowed;
                    } else {
                        $allowedAny = true;
                    }
                }
            }
        }
        return $allowedAny;
    }
protected function searchParentResourceACEs($roleId, $resourceId, $permissionId, array $params = array(), $level = 0)
    {
        $allowedAny = null;
        if (isset($this->resourcesParents[$resourceId]) && isset($this->roles[$roleId]) && isset($this->permissions[$permissionId])) {
            if (isset($this->logger)) {
                $this->logger->addRecord(Logger::DEBUG, sprintf("%sChecking if specified role has specified permission to any parent resource",
                    str_repeat('  ', $level)
                ));
            }
            foreach ($this->resourcesParents[$resourceId] as $parentResourceId => $parentResource) {
                $allowed = $this->searchACEs($roleId, $parentResourceId, $permissionId, $params, $level + 1);
                if (!isset($allowed)) {
                    $allowed = $this->searchParentResourceACEs($roleId, $parentResourceId, $permissionId, $params, $level + 1);
                }
                if (isset($allowed)) {
                    if (!$allowed) {
                        return $allowed;
                    } else {
                        $allowedAny = true;
                    }
                }
            }
        }
        return $allowedAny;
    }
protected function searchParentResourceACEs ( $ roleId , $ resourceId , $ permissionId , array $ params = array ( ) , $ level = 0 ) { $ allowedAny = null ; if ( isset ( $ this -> resourcesParents [ $ resourceId ] ) && isset ( $ this -> roles [ $ roleId ] ) && isset ( $ this -> permissions [ $ permissionId ] ) ) { if ( isset ( $ this -> logger ) ) { $ this -> logger -> addRecord ( Logger :: DEBUG , sprintf ( "%sChecking if specified role has specified permission to any parent resource" , str_repeat ( '  ' , $ level ) ) ) ; } foreach ( $ this -> resourcesParents [ $ resourceId ] as $ parentResourceId => $ parentResource ) { $ allowed = $ this -> searchACEs ( $ roleId , $ parentResourceId , $ permissionId , $ params , $ level + 1 ) ; if ( ! isset ( $ allowed ) ) { $ allowed = $ this -> searchParentResourceACEs ( $ roleId , $ parentResourceId , $ permissionId , $ params , $ level + 1 ) ; } if ( isset ( $ allowed ) ) { if ( ! $ allowed ) { return $ allowed ; } else { $ allowedAny = true ; } } } } return $ allowedAny ; }
Search ACEs associated with parent resources of specified resource for pemissions granted for the specified role.

If specified role has explicitly revoked access right to any of the parent resources then this method returns false.
If specified role has explicitly granted access right to any of the parent resources and has not revoked access right to
any of them, then this method returns true. Otherwise this method returns null.

@param string $roleId
@param string $resourceId
@param string $permissionId
@param array $params
@return bool|null
Search ACEs associated with parent resources of specified resource for pemissions granted for the specified role .