public function hasGroupPermission($groupName, $permission)
    {
        if (strpos($groupName, 'admin:') === 0) {
            $groupName = str_replace("admin:", '', $groupName);
        }
        $logins = $this->adminGroupConfiguration->getGroupLogins($groupName);

        if (!empty($logins)) {
            return $this->hasPermission($logins[0], $permission);
        }
        
        // If guest group is unknow it has no permissions.
        if ($groupName == 'guest' && is_null($logins)) {
            return false;
        }

        if (is_null($logins)) {
            throw new UnknownGroupException("'$groupName' admin group does not exist.");
        }

        return false;
    }