Skip to main content

User card, General tab

The General tab is the first tab of the user card. It holds the identity of the account, the sign-in switches and the personal settings. The form is enterprise_user_basic. The data object is enterprise_user (table enterprise.user).

The card opens on the right of the Users list. Its tabs are General, Warehouses & Roles and API Keys.

Toolbar​

ButtonWhat it doesTask page
SaveSaves the card. A new user is created, an existing one is updated (generic_save).Creating a user
RevertReads the card again from the server and drops your unsaved edits (generic_refresh).
DeleteDeletes the user and goes back (generic_delete).Deleting a user

Fields​

The fields are in four blocks: the main block, STATUS, AUDIT and PREFERENCES.

Main block​

LabelColumnTypeRequiredAllowed values and defaultWhat it does
LoginusernameText, up to 128 characters. Unique.YesAny text. A duplicate is refused with User {username} already exists.The name typed at sign-in. Matching is exact: Anna and anna are two logins. (The sign-in throttle folds case; the lookup does not.)
Full namefull_nameText, up to 200 charactersYes (screen). The column accepts empty.Any text.Shown in the Users list and as the person's name. The login is shown when it is empty.
EmailemailText, up to 120 charactersYesAny text. Not checked for format by the database.Contact address.
Employee IDemployee_idText, up to 50 charactersNoAny text.Stored only. It has no effect today.
LanguagelocaleDrop-down of active languagesYes in the databaseThe active rows of locale: en English, ru Русский, kk Қазақша.The language of the screens for this user (auth/context.rs:118).
PasswordpwdPassword fieldNo on the screenAny text. Empty means "keep the current password".Sets a new password. The stored value is an Argon2id hash. The field is always empty when the card opens, because the hash is never sent to the screen. See Sign-in, passwords and sessions.
TypetypDrop-downYesUser (default), Admin (Administrator), Sys (System), Agent.Admin and Sys skip permission checks. Only such a user may set the field. See User types and statuses.

STATUS block​

LabelColumnTypeRequiredAllowed values and defaultWhat it does
StatusstatusDrop-downYesActive (default), Invited, Locked, Disabled.Locked and Disabled stop all sign-in, including sessions already open.
API accessapi_accessSwitchNoOn (default) or off.When off, the managed API keys of this user are refused. Cookie sign-in is not affected.
RF device loginrf_loginSwitchNoOn (default) or off.When off, sign-in from the RF handheld is refused. Browser sign-in is not affected.

AUDIT block​

All four fields are read only. The server writes them.

LabelColumnTypeWhat it shows
Createdadd_whenDate and timeWhen the account was created.
Last loginlast_login_atDate and timeThe last successful sign-in by password (/api/login). The failure count is set back to 0 at the same time.
Failed attempts (24h)failed_login_attemptsWhole numberThe failed password attempts in a rolling 24 hours. When the last failure is older than 24 hours, the next failure restarts the count at 1 (crates/libs/wms-lib-core/src/model/user.rs:810).
Password age, dayscomputed from pwd_changed_atWhole numberWhole days since the stored password hash last changed. It is empty when no change is recorded. A hash that is rebuilt after a sign-in to upgrade its scheme also resets this age.

The column last_failed_login_at is stored but has no field on the card.

PREFERENCES block​

LabelColumnTypeRequiredAllowed values and defaultWhat it does
TimezonetimezoneDrop-down, up to 50 charactersYes in the databaseThe active values of the list TIMEZONE, for example UTC, Europe/Berlin, Europe/Moscow, Europe/Kyiv, Asia/Dubai, America/New_York.The zone in which this user sees dates and times (components/layout/value_format.rs:87).
Date Formatdate_formatDrop-down, up to 20 charactersYes in the databaseThe active values of the list DATEFORMAT, for example yyyy-MM-dd, dd.MM.yyyy, MM/dd/yyyy, dd/MM/yyyy HH:mm:ss.How this user sees dates (value_format.rs:95).
ThememodeDrop-down, up to 20 charactersYes in the databasedark (Dark theme), light (Light theme).The colour theme at sign-in (auth/session_init.rs:49).

The lists TIMEZONE, DATEFORMAT and THEME are rows of enterprise.code_list_value (crates/libs/wms-lib-sql/sql/wms-enterprise/migrations/001_baseline.sql:990). The lists USER_TYP and USER_STATUS come from migration 011.

Not confirmed by code: what the New User card fills in for Language, Timezone, Date Format and Theme, and what happens when you save a new user with an empty Password. The database requires the four preferences and the create call takes the password as a required text. To verify: press New User, fill only Login, Full name, Email, Type, Status, press Save, and note the message.

What it affects​

FieldRead by
StatusSign-in, every request with a session cookie, and every managed API key (crates/libs/wms-lib-auth/src/user_status.rs:52, crates/libs/wms-lib-web/src/middleware/mw_auth.rs:617).
TypeEvery permission check (crates/libs/wms-lib-auth/src/user_typ.rs), and the guards that let only a superuser manage a superuser (crates/libs/wms-lib-core/src/model/user.rs:644, :676).
API accessApiKeyStore::validate (crates/libs/wms-lib-auth/src/authentication/api_key.rs:254).
RF device loginThe sign-in route (crates/libs/wms-lib-web/src/handlers/handlers_login.rs:220).
Language, Timezone, Date Format, ThemeThe web screens of this user.

Messages​

MessageWhen
User {username} already existsThe login is taken.
Only a superuser can set a user's type to {type}You are not a superuser and you changed Type. Sending the type the account already has is accepted.
Only a superuser can change or delete the superuser account {id}You are not a superuser and the account is of type Admin or Sys. The refusal covers save, password change and delete.
Duplicate entry on user (constraint ...)A unique key other than the login was hit.

See Messages catalogue.