howdy/auth/users

Looking users up and keeping fields about them. Every operation here is privileged: authorize the caller first, as with auth.suspend. None is exposed over HTTP. Through auth.in_group they see only that group’s users. Create users with auth.provision, or let them register.

Values

pub fn fields(
  identity: auth.Auth,
  id: String,
) -> Result(field.Fields, service.Error)

The fields the user holds; read them with field.get.

pub fn find(
  identity: auth.Auth,
  where field: field.Field(a),
  is value: a,
) -> Result(List(user.User), service.Error)

The users holding value in a field, by email address: at most one when the field is unique, and at most one per group when it is unique in a group.

pub fn get(
  identity: auth.Auth,
  id: String,
) -> Result(user.User, service.Error)
pub fn list(
  identity: auth.Auth,
) -> Result(List(user.User), service.Error)

Every user, by email then id. Through auth.in_group only that group’s.

pub fn suspended(
  identity: auth.Auth,
  id: String,
) -> Result(Bool, service.Error)

Whether the user is suspended; see auth.suspend.

pub fn update(
  identity: auth.Auth,
  id: String,
  changes: List(field.Change),
  by actor: user.Actor,
) -> Result(user.User, service.Error)

Set and clear fields on a user, all or nothing. Conflict when a unique value is held by another user. The audit event names the fields changed and never their values.

✨ Search Document