Skip to content

Permissions

Permissions gate what users can see and do across the platform. They are resolved from the user's role at login (Keycloak) and enforced in the UI (hasPermission) and on the server (Authorizer). The canonical constants live in src/lib/services/permissions.ts (hvc-web).

Permission list

PermissionWhat it gates
ManageEventsCreating, editing, joining, and deleting events (dashboard/calendar)
ManageGroupsCreating/renaming/deleting contact groups
ViewContactsContacts nav entry + contact list/details
ManageRolesAdmin — roles & permissions management
ManageUsersAdmin — user management (invites, pending users)
ConfigureAppAdmin — app/tenant configuration
ViewReportsAdmin — analytics / reports (ECharts + Metabase)
ViewLedgerLedger nav entry + past-event logs
ViewRecentCallsDashboard recent-contacts panel
ChatMessage buttons / chat access
RecordStarting/stopping recordings
TakePhotoCamera / photo capture
UseHeadsetHeadset-related capabilities
UseMobileMobile-related capabilities
GenerateQRCodeGenerating login QR codes (mobile/headset login)
ManageUploadConfigAdmin — upload configuration (file types/sizes)
ManageAuthConfigAdmin — authentication configuration
ManageDevicesAdmin — device management

File permissions

Two additional file permissions are read directly from userInfo.permissions (not the Permissions constants):

PermissionWhat it gates
CanDownloadFilesDownloading shared files (gallery)
CanShareFilesSharing files with other contacts (gallery)

How it works

  1. The user's role defines a set of permissions (configured in Roles & Permissions.
  2. At login, me / tenantConfig resolves the user + their permissions into the userInfo store.
  3. UI gates with hasPermission(Permissions.x) — unauthorized views/actions are hidden.
  4. Server-side, the Authorizer enforces the same permissions.

Released under the MIT License.