Tenant Linking
Tenant linking connects an existing business identity in parties to a platform login in users.
Flow
- The landlord creates a contract and adds the tenant as a
party. - The system creates an invitation with a secure token.
- The tenant receives the invitation link by email or another channel.
- The tenant opens the link and signs up or logs in.
- The backend verifies the token, status, expiration, and target party.
- The system links
users.party_idto the tenantparties.id. - Role-based access is enabled for the tenant.
Proposed entity: invitations
| Field | Description |
|---|---|
id | Primary identifier. |
token_hash | Secure hash of the invitation token. |
invited_party_id | Party that should be linked. |
invited_email | Email address used for the invitation. |
invited_by_user_id | User who created the invitation. |
context_type | CONTRACT, PROPERTY, or future context. |
context_id | Linked context identifier. |
role | Role granted after acceptance. |
status | PENDING, ACCEPTED, EXPIRED, REVOKED. |
expires_at | Expiration timestamp. |
accepted_at | Acceptance timestamp. |
created_at | Creation timestamp. |
Access model
The tenant should only see data connected to their role:
- their contracts
- shared documents
- rent installments and payment status relevant to them
- maintenance requests they reported
The tenant should not automatically see landlord banking data, internal notes, scoring internals, or unrelated property data.