public function getRoles()
    {
        if ($this->initialized === false) {
            $this->initialize();
        }

        if ($this->roles !== null) {
            return $this->roles;
        }

        $this->roles = ['Neos.Flow:Everybody' => $this->policyService->getRole('Neos.Flow:Everybody')];

        $authenticatedTokens = array_filter($this->getAuthenticationTokens(), function (TokenInterface $token) {
            return $token->isAuthenticated();
        });

        if (empty($authenticatedTokens)) {
            $this->roles['Neos.Flow:Anonymous'] = $this->policyService->getRole('Neos.Flow:Anonymous');
            return $this->roles;
        }

        $this->roles['Neos.Flow:AuthenticatedUser'] = $this->policyService->getRole('Neos.Flow:AuthenticatedUser');

        /** @var $token TokenInterface */
        foreach ($authenticatedTokens as $token) {
            $account = $token->getAccount();
            if ($account === null) {
                continue;
            }

            $this->roles = array_merge($this->roles, $this->collectRolesAndParentRolesFromAccount($account));
        }

        return $this->roles;
    }