Step 5 — Roles and sign-in
So far everything was done as a superuser, who sees everything. This step adds two roles, two users to test them, a data scope, and sign-in with the company account.
At a glance
Two roles
Liberty Next → Administer → Access → Roles: create each role. The Access tab shows the menu tree of every app, with a three-state control on each node (inherit, allow, deny); allowing a menu entry also grants the query or the dashboard it opens. See Roles & permissions.
crm-viewer — reads the CRM
| Setting | Value |
|---|---|
| Baseline | No access |
| Menus | Allow on the crm app's Sales folder and on Pipeline. |
The holders see the screens and the dashboard, but every write is refused: the write queries (customers_put, deals_post…) are not granted.
crm-sales — works the deals
| Setting | Value |
|---|---|
| Baseline | No access |
| Menus | Allow on Sales and Pipeline. |
| Beyond the menus | Allow — Connector (all queries) — crm. |
The connector rule grants every query of crm, writes included. Save each role.
Two users
Liberty Next → Administer → Access → Users → + Add user:
| User | Role | Attribute |
|---|---|---|
alice | crm-viewer | — |
bob | crm-sales | country = FR |
Give each a password. Sign in as alice in a private window: the CRM shows Sales and Pipeline; changing a customer is refused. As bob: the dialogs save. See Users.
A data scope — each salesperson's country
Bob should only see the customers of his country.
- Make the deals carry the country: in
deals_get, join the customer and select its country:
SELECT d.ID, d.CUSTOMER_ID, d.NAME, d.STAGE, d.AMOUNT, d.CLOSE_DATE, d.OWNER, c.COUNTRY
FROM deals d JOIN customers c ON c.ID = d.CUSTOMER_ID
- In the
crm-salesrole, Data scope tab, a rule: columnCOUNTRY, connectorcrm, From the user's attributecountry. Save.
Bob signs out and in again: Customers and Deals show the French customers only — ACME Industries and Beta SARL — and a write outside his scope is refused. The scope is applied by the server, to the screens, the dashboard and the AI assistant alike. Alice's role has no rule: she still sees everything. See Roles & permissions → Data scope.
Sign in with the company account
To let users sign in with their company account (Entra ID, Keycloak, Okta…), fill Liberty Next → Administer → App → OpenID Connect (SSO) with the values of the application registered at the provider. A Sign in with OIDC button appears on the sign-in page; new users arrive without roles, an administrator gives them crm-viewer or crm-sales.
Full recipe: OIDC sign-in.
What you have now
Two roles cut from the app's own menu, users who see their part, and rows filtered by the server according to each user.
→ Step 6 — AI and jobs: questions in plain language and a daily job.