Skip to content

Organization provisioning

The development-only notifi:organization:provision task creates a tenant, a new user and that user’s admin membership as one database transaction. An existing email is rejected; it never silently attaches or changes an existing account. The database sequence may have gaps after a failed operation.

This is not a public registration flow or a production provisioning system. There is no application-level platform administrator yet. During development, access is limited to a trusted operator with interactive shell and access to the NotiFi development container and runtime database credentials. The task refuses non-development environments. It is not authorized by a tenant-admin role.

Run from the repository on a trusted terminal:

Terminal window
docker compose run --rm --no-deps -it web bin/rails notifi:organization:provision

Enter organization name and administrator email when prompted. Enter and confirm the password interactively; input is not echoed or passed in command arguments. Use only development data. The task does not create a session, send email, configure MFA or provision site-specific permissions.

Before real users or customer data, implement platform-admin authorization, auditing, MFA, recovery and mail, durable rate limiting and protection of membership data, as detailed in identity-foundation.md.