Managing users and invitations
What Is It?
Adding people to your workspace, giving them a role, and removing access when they leave.
Why Would I Use It?
Access should follow the job, not stay forever.
Who Can Use It?
OWNER and ADMIN (admin.manage_users). Other roles see the pages only if their grants allow.
Where Can I Find It?
Control → Users and Control → Invitations
(/dashboard/administration/users, /dashboard/administration/invitations).
Invite someone
- Open Control → Users and choose Invite.
- Enter their email and choose the role (OWNER is normally not offered — transfer ownership instead).
- Optionally assign a department.
- Send. The invitation is queued by email and expires after 7 days by default.
- The invitee opens the link. A new account is created if needed; the membership becomes ACTIVE in the same transaction.
What Happens Next?
The new member appears in the user list. They see only what their role, department, and plan allow.
Manage an existing member
| Task | Effect |
|---|---|
| Change role | Takes effect on their next request |
| Suspend | Blocks access; membership is retained |
| Remove | Ends membership; historical records keep the person's name |
| Resend invitation | Issues a fresh token; the old one becomes invalid |
| Revoke invitation | The pending link stops working |
Get the invite flow right
- Inviting an email that already has a pending invitation supersedes the old one. Only the newest link works.
- Inviting an existing SahajFlow user adds a membership to their existing account; it does not create a duplicate login.
- Seat limits come from the plan (Starter 10, Balanced 25, Premium unlimited). Accepting beyond the limit is refused until a seat is freed.
- The plaintext invitation token is returned in API responses only in DEBUG. In production it travels by email only.
Sessions and security
Administrators can revoke a member's sessions (single or all) from the API. The tenant UI for this was not confirmed in this repository; if a member must be cut off immediately, removing or suspending the membership also blocks the next request.
Every login attempt, failed login, password change, and session revocation is recorded as a security event for later investigation.
Important things to know
- A member can belong to several workspaces with different roles.
- Removing someone does not delete their business records, activities, or audit trail.
- Ownership is a membership role, not a field on the organization. Transferring it swaps OWNER and ADMIN between two active members atomically.
- The "Data Visibility" selector was removed from the user and invitation dialogs; visibility is governed by the backend policy, not chosen per invite.
Common problems
| Symptom | Likely cause | What to do |
|---|---|---|
| Invitation email never arrives | SMTP misconfiguration, spam filtering, or a worker delay | Resend; ask an admin to check email settings |
| "Invitation expired" | 7-day limit passed | Resend |
| Invitee lands in the wrong workspace | They already belong to another workspace | Use the workspace switcher |
| Cannot invite: seat limit | Plan user cap reached | Remove a member or change plan |
| Role choice rejected | The role is not assignable in your tenant | Use one of the offered roles; custom roles must exist first |