Skip to main content

Module users

Module users 

Source
Expand description

Operator management for the web admin: create, list, re-password, enable, disable, delete, and the password check the login path runs.

The operation layer, not a front end: no printing, no HTTP, no terminal. src/cli/webadmin.rs and src/webadmin/handlers/session.rs both dispatch here, which is what keeps the password policy, the duplicate check and the rehash-on-login identical between them.

Enums§

AuthOutcome
The result of checking a username and password.
UserError
Why creating or re-passwording an operator failed.

Functions§

authenticate
Checks a username and password, re-hashing the stored digest if it was written under parameters this build has moved past.
confirm_delete_user
delete_user, asking first and naming what goes with it.
create_user
Creates an operator.
delete_user
Deletes an operator, cascading to their sessions. false when there was no such user.
list_users
Every operator, oldest first.
revoke_sessions
Revokes every session one operator holds, without touching the account. None when there is no such user.
set_password
Replaces an operator’s password and revokes every session they hold.
set_status
Moves an operator between active and disabled.