caterium-app/docs/ACCOUNT-ACCESS-20260917.md
2026-09-17 20:40:24 +03:00

1.4 KiB

Account access and company isolation

Production requires a signed-in account and a company membership. The login form remains available when the backend is unreachable, and an old sunLocalOnlyModeV1 preference cannot bypass it. Application sections are hidden from the initial HTML until access is resolved.

The emergency local workflow remains implemented. To restore it during an incident, deliberately change emergencyLocalEnabled in public/core/access-policy.js, bump the release/cache version, run the release checks and deploy. There is no public browser setting that enables this workflow in the current release. This switch does not change server authentication or RLS.

A developer with their own company opens the normal application. Developer tools are selected separately in the sidebar and continue to require MFA. The production developer test company is provisioned empty, independently of the exclusive company catalog and imported customer history.

Client caches are captured, cleared and restored together with orders, catalog photos and company documents. Changing company cancels queued client writes, suppresses rebuilding caches from old runtime arrays, and ignores in-flight responses for the previous workspace. Tests cover switching to an empty company and back, old anonymous-mode preferences, unavailable authentication endpoints, and normal developer entry.