Users and roles
Add people, give them roles, and control how they sign in.
A User is a person who can sign in. Its name is the lower-cased email, so Jane@Acme.com becomes jane@acme.com. Each User holds roles, and roles carry the rights described in Permissions.
Only a System Manager creates Users, changes their roles or disables them. A user can edit their own name, picture, phone numbers, language, time zone and desk theme, and sees their own roles read-only.
Add a user
Open /desk/user and click New. The dialog asks for Email and First Name.
Open the new User and add rows to Roles, or pick Role Profiles.
Tick Send Welcome Email to mail a link to set a password, or click Set Password to set one yourself.
From the terminal:
cardinal user add -t erp.localhost jane@acme.com --first-name Jane --role "Sales User" --inviteThe welcome mail needs an outgoing Email Account. Without one, the save writes an Error Log and warns you.
Invite by email
A User Invitation mails a link to /accept-invite. The person sets a password there, and Cardinal creates the User with the invited roles, or adds the roles to an existing User.
| Field | Example |
|---|---|
ravi@acme.com | |
| Roles | Sales User, Stock User |
| Status | Pending, then Accepted, Cancelled or Expired |
An invitation expires after 3 days. A Pending invitation has Resend and Cancel buttons. Each address can have one Pending invitation at a time.
Standard roles and users
| Role | Meaning |
|---|---|
| Administrator | Passes every permission check. Held only by the Administrator user |
| System Manager | Manages users, settings, customization and permissions |
| Desk User | Added to anyone holding a role with Desk Access |
| All | Every signed-in user |
| Guest | Visitors who are not signed in |
| Website Manager | Edits Website Settings and Web Pages |
| Automation Manager | Builds automations |
A user with no role that has Desk Access is a Website User. They can use the website and web forms but not the desk.
Administrator and Guest are seeded users. Only Administrator sees them in the User list.
Role Profiles and Module Profiles
A Role Profile is a named set of roles. A User holding one or more profiles gets the union of their roles, and the Roles table turns read-only. Changing a profile updates every holder in a background job.
A Module Profile lists modules to hide from a user's desk navigation. It takes away no rights.
User form buttons
| Button | Does |
|---|---|
| Set Password | Sets a new password for an enabled user |
| Send Password Reset | Mails a reset link |
| Disable | Disables the user and ends their sessions |
| Generate Keys | Creates an API key and secret. The secret shows once |
| Change Password | On your own form, when you cannot write other Users |
| Connect Telegram | On your own form, once the site has a Telegram bot |
Disabling a user, changing their roles' desk access or setting a password with Log Out of All Sessions ticked signs them out on every node at the next request.
Passwords
Cardinal scores each new password from 0 to 4 with zxcvbn. Below System Settings' Minimum Password Score (2 by default), the password is saved with a warning that names the problem. Tick Enforce Password Strength to refuse weak passwords instead.
Any password is refused when it is empty, longer than 1024 characters, or starts or ends with a control character such as a newline.
Signing in
Users sign in at /login with their email. These System Settings change the rules:
| Setting | Default | Effect |
|---|---|---|
| Session Expiry (Hours) | 170 | Idle time before a session ends. Each request extends it |
| Allow Login Using User Name | off | Accept the username field as the login |
| Allow Login Using Mobile Number | off | Accept mobile_no as the login |
| Allow Consecutive Login Attempts | 10 | Failed logins of one user from one IP before that IP waits |
| Allow Login After Fail (Seconds) | 60 | How long the wait lasts |
| Password Reset Link Generation Limit | 3 | Reset links per user per hour |
| Reset Password Link Expiry Duration | 20 minutes | How long a reset link works |
cardinal user unlock -t HOST LOGIN clears a lockout. Each login, failed login and logout writes an Activity Log row.
API keys
Generate Keys gives a key and a secret. Send them on each request:
curl -H "Authorization: token $API_KEY:$API_SECRET" https://erp.acme.com/api/rec/CustomerGenerating keys again replaces the secret and keeps the key. A password change leaves keys working. Disabling or deleting the User stops them.