pub struct AdminUser {
pub role: Option<String>,
pub banned: bool,
pub ban_reason: Option<String>,
pub ban_expires: Option<OffsetDateTime>,
}Expand description
The columns admin adds to user. None of them is client-settable; only admin endpoints
and the server API change them. Apps read them with session.user.plugin::<Admin, _>().
Fields§
§role: Option<String>The user’s roles, comma-separated ("admin,support"). Filled with the configured
default role right after the user is created; read it with Admin::roles_of,
which falls back to the default role while it is empty.
banned: boolWhether the user is banned. Banned users can’t sign in.
ban_reason: Option<String>Why the user is banned.
ban_expires: Option<OffsetDateTime>When the ban lifts; None bans for good. Expired bans lift at the next sign-in.
Implementations§
Source§impl AdminUser
impl AdminUser
Sourcepub const ROLE: Col<AdminUser, Option<String>>
pub const ROLE: Col<AdminUser, Option<String>>
The user’s roles, comma-separated ("admin,support"). Filled with the configured
default role right after the user is created; read it with Admin::roles_of,
which falls back to the default role while it is empty.
Sourcepub const BAN_EXPIRES: Col<AdminUser, Option<OffsetDateTime>>
pub const BAN_EXPIRES: Col<AdminUser, Option<OffsetDateTime>>
When the ban lifts; None bans for good. Expired bans lift at the next sign-in.