howdy/auth/group
Groups partition users: a workspace, a tenant, an organization. Every
user belongs to exactly one. Manage them with howdy/auth/groups.
Types
The least a group is. Small facts about it, such as a billing id, fit
howdy/auth/field; anything relational belongs in application tables
keyed by its id. updated_at moves when the group is renamed or has a
field changed, not when its membership does. Both are whole seconds, and
created_at is the epoch for a group that predates it.
pub type Group {
Group(
id: String,
name: String,
created_at: timestamp.Timestamp,
updated_at: timestamp.Timestamp,
)
}
Constructors
-
Group( id: String, name: String, created_at: timestamp.Timestamp, updated_at: timestamp.Timestamp, )
How users relate to groups. Choose one with auth.with_groups.
pub type Mode {
Single
OneGroupPerUser
AccountPerGroup
}
Constructors
-
SingleEvery user is in the one group,
default_id. This is what an installation that never mentions groups gets. -
OneGroupPerUserThere are many groups and each user is in exactly one of them. An email address has one account across the whole installation.
-
AccountPerGroupThere are many groups and an email address may have a separate account in each: separate user ids, credentials and sessions. Within one group an address still has at most one account.
Values
pub const default_id: String
The group every user is in under Single. It always exists.