Users
The Users page in the admin interface allows for the management of user accounts associated with a selected primary account. Users can be created, viewed, edited, and deleted through this interface.
Permissions
Access to the Users page and its functionalities is controlled by user permissions. Generally, users with owner
, admin
, or users
permissions can manage users. Specific edit functionalities like modifying user_data
might be further restricted to owner
roles.
Adding a New User
To add a new user:
- Navigate to the Users page.
- Expand the "New User" section.
- A form will appear with the following fields:
- Account UID: Automatically populated if an account is selected; otherwise, it needs to be entered.
- UID: A unique identifier for the user, pre-filled with a generated UUID.
- Secret: A secret key for the user, pre-filled with a generated UUID.
- Status: A toggle to activate or deactivate the user (defaults to Active).
- Login: The username for the user.
- Password: The password for the user.
- First Name: The user's first name.
- Last Name: The user's last name.
- Phone: The user's phone number.
- Email: The user's email address.
- User MFA: A toggle to enable or disable Multi-Factor Authentication (defaults to Enabled).
- MFA Delivery: A dropdown to select the MFA delivery method (e.g., "sms", "email").
- Upon submission, the system:
- Hashes the password.
- Checks if any users already exist for the selected account.
- If no users exist, the new user is assigned
owner
andagent
permissions for that account. - Otherwise, the new user is assigned
agent
permissions. - Stores the user data, including initial permissions and the selected account as the
last_account
, in a JSON format.
- Click the "Create User" button to save the new user.
Listing Users
Existing users for the currently selected account are displayed in a list:
- Each user is shown in an expandable section, displaying their login, status (active/inactive), full name, email, and phone number.
- Expanding a user's section reveals:
- UID
- MFA Status (Enabled/Disabled)
- MFA Delivery Method
- Each user entry has "Edit" and "Delete" buttons.
Editing an Existing User
To edit an existing user:
- Click the "Edit" button next to the desired user in the list.
- The "Edit User" form will appear, pre-filled with the user's current information.
- The following fields can be modified:
- Status
- Login
- First Name
- Last Name
- Phone
- User MFA
- MFA Delivery
- User Data (JSON): Editable by users with appropriate permissions (e.g.,
owner
).
- Buttons available within the edit form:
- Save Changes: Saves the modifications.
- Reset Password: Opens a sub-form to enter and confirm a new password.
- The new password will be hashed before saving.
- Cancel: Discards changes and closes the edit form.
- Edit Permissions: Opens a dialog to modify the user's permissions for associated accounts.
- Permissions like
owner
,admin
,agent
, etc., can be assigned or revoked per account.
Deleting a User
To delete a user:
- Click the "Delete" button next to the desired user in the list.
- The system will attempt to remove the user record from the database.
- A success or error message will be displayed.
Session Management
- The page checks if a user is logged in. If not, it prompts for login.
- If MFA is enabled for the user and the MFA code hasn't been provided in the current session, it will prompt for MFA.
- The
Selected Account
andSelected Agent
are used to filter and associate users with specific accounts and agents where applicable.