Reference · by task
Sign people in and decide who sees what
Sessions, magic links and passkeys; then grants, roles, tenancy and the permissions report. Read them in this order. Each page links to the pages around it.
- The principal
The principal is whoever is calling, once Jadpo has checked them: either a user (a person) or a service (another system, such as a partner's server).
- Ways to sign in
authentication { }inauthentication.jadpolists the ways your app lets a caller prove who they are. - Magic links
A magic link signs a person in by email, with no password.
- Passkeys
A passkey lets a person sign in with their fingerprint, their face or their device's PIN, with no password and no email to wait for.
- Routes: signed in by default
Every route needs a signed-in caller unless it says otherwise.
- Who is calling: current_principal
A route reads the signed-in caller as
current_principal, and passes it to the action it runs like any other argument. - Grants
A grant says who may do one thing to an entity's records.
- A user field on the record
Use a user field when a record belongs to one person, such as a todo and its owner.
- A membership role
Use a role when people get access by belonging to something, such as the editors of a company.
- Tenancy
Use tenancy when your app is shared by many customer companies, so that one company never sees another's data.
- Field restrictions
A field follows its entity's grants unless it says otherwise.
- When policy says no
Your code never handles a policy refusal itself.
- The permissions report
Policy is written beside each entity, so nobody has to keep a central copy.