Hanhao OntologyDOCS
Main site 中文

Tenancy, permissions & audit

Security is built in: tenancy isolation is middleware-enforced, permissions act at row level, audit is append-only and immutable.

Tenant isolation

All business data is row-isolated: tenant filtering derives from login state and is middleware-enforced; tenant context comes from the login session. Single-tenant instances first, multi-tenant design ready; cross-tenant escalation has dedicated tests.

Roles & page permissions

RoleCapabilities
Tenant adminUsers, permissions/pages, schema, models, ops, god-mode (audited)
adminSchema + business data + system config
editorBusiness read/write; schema managed separately
viewerRead-only
agent (service)Restricted protocol calls; high-risk needs approval

User lifecycle: registration (tenant switch + approval), create, edit, disable/enable, soft delete. Page permissions and backend enforcement stay consistent.

Row visibility & org ownership

Row rules answer “which rows can be seen”: identity match plus all row conditions. Org ownership is the coarse boundary: empty = whole tenant; owned = only that org subtree, narrowed further by row conditions.

Audit & sessions

Last updated:2026-11-18