cardinal

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" --invite

The 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.

FieldExample
Emailravi@acme.com
RolesSales User, Stock User
StatusPending, 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

RoleMeaning
AdministratorPasses every permission check. Held only by the Administrator user
System ManagerManages users, settings, customization and permissions
Desk UserAdded to anyone holding a role with Desk Access
AllEvery signed-in user
GuestVisitors who are not signed in
Website ManagerEdits Website Settings and Web Pages
Automation ManagerBuilds 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

ButtonDoes
Set PasswordSets a new password for an enabled user
Send Password ResetMails a reset link
DisableDisables the user and ends their sessions
Generate KeysCreates an API key and secret. The secret shows once
Change PasswordOn your own form, when you cannot write other Users
Connect TelegramOn 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:

SettingDefaultEffect
Session Expiry (Hours)170Idle time before a session ends. Each request extends it
Allow Login Using User NameoffAccept the username field as the login
Allow Login Using Mobile NumberoffAccept mobile_no as the login
Allow Consecutive Login Attempts10Failed logins of one user from one IP before that IP waits
Allow Login After Fail (Seconds)60How long the wait lasts
Password Reset Link Generation Limit3Reset links per user per hour
Reset Password Link Expiry Duration20 minutesHow 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/Customer

Generating keys again replaces the secret and keeps the key. A password change leaves keys working. Disabling or deleting the User stops them.

On this page