li3_access\extensions\adapter\security\access\AuthRbac::_accessable PHP Method

_accessable() protected method

_hasRole Compares the results from _getRolesByAuth with the array passed to it.
protected _accessable ( $resources, $roles, array $options = [] ) : void
$options array
return void
    protected function _accessable($resources, $roles, array $options = array())
    {
        $resources = (array) $resources;
        if (in_array('*', $resources)) {
            return true;
        }
        foreach ($resources as $resource) {
            if (array_key_exists($resource, $roles)) {
                return true;
            }
        }
        return false;
    }