Onboard client staff
Goal
Give a client's people accounts and roles in a deployed Spine project — the repeatable shape for agencies handing a project to client staff.
Prerequisites
- The client account exists (or you decided accounts-as-tenants vs one-project-per-client — see
accounts.md; that tenancy call is upstream of everything here). - You hold
system_adminor an*_adminrole on the account you're staffing —create-inviterefuses lesser callers. APP_BASE_URLis set — invite links are built from it.
Steps
- Confirm the roles exist. Check the account's
roles(Admin → Access → Roles, orrolesentity page): the seed givessystem_admin/member/member_admin-style slugs; custom apps may add their own. Pick the least-privilege role that covers each person's job —record_permissionson the project's types is what the role actually unlocks. - Create the account row if needed. Accounts-as-tenants: the client's
accountsrow must exist before people can be bound to it (accounts.md—parent_id/account_pathsdefine the hierarchy). One-project-per-client: the account is already the project. Invite each person. Admin → Access → Invites → Generate:
- name + email + role → produces an
invite_url({APP_BASE_URL}/register?t=<token>); the page shows the role picker only when more than one role is assignable. - Behind the scenes it creates a stub
peoplerow carrying the token and a 7-day expiry — identity, account, and role are bound before the person authenticates. - Send the link out of band (chat/email). Inviting for
system_adminis refused unless you're alreadysystem_admin. API equivalent:POST /api/invitescreate-invite— see invites for the action surface.
- name + email + role → produces an
- Track acceptance. The Invites table shows
pending→active/claimedas people register. Links expire in 7 days —reinvitemints a fresh URL and kills the old token;revokemarks the stubinactive. - Verify placement. After registration, the person should appear in the account's People list with the right role. Spot-check with
npx spine-framework auth whoamiusing their credentials, or confirm thepeoplerow'saccount_id/role_id— placement is server-side viacomplete_registration_placement, so a correct invite means a correct person. - Hand over admin. If the client runs their own admin afterwards, make sure at least one client person holds an admin role before you leave — and revoke/deactivate your own invite or person row if the engagement ends (revoke is soft and auditable, never a hard delete).
Verify
- Each person can sign in and lands on the views their role allows — check one create/read per role.
- No
pendinginvites older than you intend; nosystem_admingrants that weren't deliberate.
Common mistakes
- Sharing one login — invites exist precisely so each person is a distinct
peoplerow with their own role; shared logins break the audit trail (logsattributes actions per principal). - Inviting with the wrong account bound — placement is server-side and binds the invite's account; a person invited under account A can't later "move" by re-registering. Re-issue under the right account.
- Assuming expiry means cleanup — expired invites leave
inactivestubs; they're harmless but noisy — revoke what you won't reinvite. - Forgetting
APP_BASE_URL— invite links built with a dev URL send client staff to the wrong origin.
Reference
- Invites — statuses, actions, placement RPC.
- Roles · People · Accounts — the entities being wired together.
- Scope and accounts — tenancy model.