Hi,
I am trying to create a user with the ro_admin role using the latest gocb client.
I can see the ro_admin role when I call UserManager.GetRoles and I can also create a user using the cli john doe example with just the single global role.
user := gocb.User{
Username: username,
DisplayName: usernameConfig.DisplayName,
Password: password,
Roles: []gocb.Role{
{
Name: "ro_admin",
},
},
}
err = mgr.UpsertUser(user,
&gocb.UpsertUserOptions{
DomainName: "local",
})
I always get the error…
couchbase_test.go:140: err: {"errors":{"roles":"Cannot assign roles to user because the following roles are unknown, malformed or role parameters are undefined: [ro_admin[]]"}} | {"unique_id":"157521e8-de25-4a23-b76b-fb7164a6b006","endpoint":"http://localhost:8091"}
If I create a user with a role that requires a bucket: name such as “bucket_admin” everything works fine.
Any pointers as to what I am doing wrong? I am using Enterprise Edition 6.5.1 build 6299 ‧ IPv4 © 2020 Couchbase, Inc.