Beyond login: keep each company’s data separate
When companies share an app, searches, downloads and exports need checks against the user's company and role. Data access still needs protection when a menu has been hidden.

The workflow illustrates a possible design and is not a client case study.
- Identify user and company
- Authorize action
- Audit and revoke
Hiding a menu does not protect the data
A user may open a direct link or call the API, bypassing a hidden menu. They may also belong to several companies, or still have an active session after a role change. For each action, establish which company they represent and what they are currently allowed to do. Enforce those checks where the data is accessed.
Review identity and data-access rules
Supabase provides row-level security, but its rules must match your data and company relationships. Review the identity and access design as a whole, including file storage and privileged server operations. A different login screen alone will not separate customer data.
Follow access checks from the action to its data
List what each role is allowed to do, then follow one action through the server, database and attached files. Make invitations, company switching and removal of access explicit. Keep privileged operations limited to what is needed and record who approves role changes.
Test changed URLs and company identifiers
Use accounts from two companies with several roles to test direct API requests, searches, downloads and exports. Then remove a member, let an invitation expire and change the company ID in a request. Check both that the action is refused and that the response contains no data the account is not allowed to see.
Bring roles and company relationships
Bring the roles, company relationships, types of data and actions requiring approval. Include people who work across more than one company.