How DataRoles fits into BuildWithHQ
BuildWithHQ DataRoles provide one authorization model for first-class modules, custom modules, pages, APIs, AI operations, exports, billing actions, and isolated extensions. Users may hold multiple active roles, and a record may be shared with multiple roles without duplicating the data. Access resolves as a filter rather than a gate: unentitled records are absent from the result set, not refused.
Core architecture
Every DataRole belongs to one customer account. Role membership and record sharing are resolved inside the same tenant boundary.
A user can hold several active DataRoles, allowing functional, geographic, financial, and supervisory responsibilities to be combined.
The universal RecordId can be shared with one or more roles, allowing contacts, conversations, tasks, files, calendar events, AI insights, and custom records to inherit the same security context.
Read, AI-read, export, billing, trust-record, and disbursement-approval permissions are evaluated independently.
Named permission keys extend the model with vertical capabilities such as workflow publishing, contact merging, or encrypted-field reveal.
Secured AI relationship
Human read access does not automatically permit AI use. CanAiReadRecords can be narrower than CanReadRecords.
The AI layer receives only records already allowed by the user’s tenant, role, location, and AI-read envelope.
An AI suggestion does not bypass business permissions. The resulting action is checked again before execution.
Example
A doctor, nurse, CNA, and billing specialist can share one patient record while receiving different fields, actions, AI permissions, and financial capabilities.
A regional manager can see several locations, a franchise owner can see one organization, and corporate staff can see records across the network.