Tenant model
Row-level security (RLS)
PostgreSQL row-level security policies filter every query bytenant_id. Application code sets tenant context per request from the authenticated session.
Even if application code has a bug in a
WHERE clause, RLS prevents cross-tenant reads at the database layer.Authentication
Session-protected routes return
401 without a session and 403 when the user is not a member of the active workspace.
Who can access a workspace
Team management
Workspace admins can invite members:POST /api/team/invite→ invite link- Invitee opens link →
POST /api/team/join - Session switches to the invited workspace
Self-hosted considerations
Self-hosted LaneSync deployments still use the same RLS model. Each installation typically serves one or more orgs depending on your GitHub App registration. See Enterprise security.Public vs session endpoints
See API introduction for the full auth model.