Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usehasp.com/llms.txt

Use this file to discover all available pages before exploring further.

Hasp apps have four roles: viewer, org_admin_viewer, editor, and admin. The current user’s role is returned by sdk.getBootstrap().

Role Capabilities

Actionviewerorg_admin_viewereditoradmin
Read recordsYesYesYesYes
Create recordsNoNoYesYes
Update recordsNoNoYesYes
Delete recordsNoNoYesYes
Manage app settingsNoNoNoYes

The org_admin_viewer Role

Org admins and owners have baseline read access to every app in their organization — including apps configured as private or invite_only where they haven’t been invited as a member. When an org admin visits such an app, sdk.getBootstrap().role returns 'org_admin_viewer'. This role:
  • Has the same permissions as viewer (read-only)
  • Signals that the user is seeing the app via baseline admin visibility, not via per-app membership
  • Does NOT grant write access
If your app uses a role allowlist, add 'org_admin_viewer' to your read-allow set:
const ALLOWED_READ_ROLES = ['viewer', 'org_admin_viewer', 'editor', 'admin'];
const ALLOWED_WRITE_ROLES = ['editor', 'admin'];

Getting the Current Role

const bootstrap = await sdk.getBootstrap();
// bootstrap.role — 'viewer' | 'org_admin_viewer' | 'editor' | 'admin'

Role-Based UI

const bootstrap = await sdk.getBootstrap();
const canEdit = ['editor', 'admin'].includes(bootstrap.role);

if (canEdit) {
  document.getElementById('create-btn').style.display = 'block';
}
See Role-Based UI guide for more patterns.

App Access Modes

Each app has an access mode that determines the default role for org members:
ModeMembers can accessOrg admins always see?Default role for members
OpenAll org membersYesviewer
Open + guestsAll org members plus guests from allowed domainsYesviewer
Invite-onlyOnly members with an explicit grantYes — via org_admin_viewer baselineNo access without a grant
PrivateOnly members with an explicit grantYes — via org_admin_viewer baselineNo access without a grant
Org admins’ baseline visibility is a governance right, not an app-level permission. It cannot be revoked at the app level. Access mode is configured by org admins per-app in the Hasp dashboard.