organization
Add reusable organizations, roles, memberships, and invitations.
organization is business infrastructure, not part of the authentication
anchor. It depends on auth so memberships can reference stable auth user ids.
lenso module install auth
lenso module install organization
cargo run --bin migrate
lenso serve
It owns:
- organizations with stable slugs and archive timestamps;
- configurable per-organization roles and permission strings;
- memberships from auth users to organizations;
- invitation creation, expiry, acceptance, and revocation;
- business administration surfaces and public Rust helpers such as
has_permissionandaccept_invitation.
Invitation tokens are returned once and stored only as hashes. The module does not send invitation email; use the application’s notification path to deliver the invitation URL.
When built with the audit-log feature, organization creation and invitation
changes can also write events to the official audit-log module.