User

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

A Couchbase Server user account.

Constructors

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

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

Properties

Link copied to clipboard
val displayName: String

An optional descriptive name.

Link copied to clipboard
val groups: Set<String>

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
val username: String