Neos\Flow\Security\DummyContext::hasRole PHP Метод

hasRole() публичный Метод

Returns TRUE, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively.
public hasRole ( string $roleIdentifier ) : boolean
$roleIdentifier string The string representation of the role to search for
Результат boolean TRUE, if a role with the given string representation was found
    public function hasRole($roleIdentifier)
    {
        if ($roleIdentifier === 'Neos.Flow:Everybody') {
            return true;
        }
        if ($roleIdentifier === 'Neos.Flow:Anonymous') {
            return !empty($this->roles);
        }
        if ($roleIdentifier === 'Neos.Flow:AuthenticatedUser') {
            return empty($this->roles);
        }
        return isset($this->roles[$roleIdentifier]);
    }