Roles and permissions

Role capability flags and how access is checked.

Create roles with upsertAccessRole (canManageRoles).

FlagGives
canManagePeopleStaff and invitations
canManageRolesRoles
canAccessDashboardDashboard and AI chat
canManageOnboardingOnboarding
canManagePracticePractice, catalog, storefront
canScheduleAppointments, schedules
canReadClientsClient records
canManageClinicalClinical workflows
canManageSensitiveRecordsSensitive and governance records
canManageInventoryInventory
canManageFinancePayments, commissions
canManageCommunicationsTemplates and messages
canViewReportsReports
canManageIntegrationsProviders

Each request re-reads the user and role. Access is denied when the user is disabled, moved practice, or the role no longer grants the flag.