public function getUsers($name, ...$domain)
    {
        if (!$this->hasRole($name)) {
            throw new CasbinException('error: name does not exist');
        }

        $names = [];
        array_map(function ($role) use (&$names, $name) {
            if ($role->hasDirectRole($name)) {
                $names[] = $role->name;
            }
        }, $this->allRoles);

        return $names;
    }