User

class User(val username: String, val displayName: String = "", @SinceCouchbase(value = "6.5") val groups: Set<String> = emptySet(), val roles: Set<Role> = emptySet(), val password: String? = null)

A Couchbase Server user account.

Constructors

Link copied to clipboard
constructor(username: String, displayName: String = "", @SinceCouchbase(value = "6.5") groups: Set<String> = emptySet(), roles: Set<Role> = emptySet(), password: String? = null)

Properties

Link copied to clipboard

An optional descriptive name.

Link copied to clipboard

Names of the groups this user belongs to. Adding a user to a group indirectly grants them the roles associated with the group.

Link copied to clipboard
val password: String? = null

The user's password. Always null when getting a user. Must be non-null when creating a user. May be null when updating a user, if the intent is to preserve the user's existing password.

Link copied to clipboard
val roles: Set<Role>

Roles assigned directly to the user. Does not include roles inherited from groups. (If you're interested in inherited roles as well, see UserAndMetadata.effectiveRoles.)

Link copied to clipboard

Functions

Link copied to clipboard
fun copy(username: String = this.username, displayName: String = this.displayName, groups: Set<String> = this.groups, roles: Set<Role> = this.roles, password: String? = this.password): User
Link copied to clipboard
open override fun toString(): String