Skip to content

@xtandard/entitlements/authorization/roles

Role-based authorization: rolesAuthorization() with the built-in viewer / support / billing-admin / admin / runtime-service presets or your own role → actions policy.

import { … } from "@xtandard/entitlements/authorization/roles";
Name Summary
rolesAuthorization Create a role-based AuthorizationProvider.
Name Summary
RolesAuthorizationOptions Options for rolesAuthorization.
Name Summary
RolePolicy A role policy: each role maps to an explicit action list or the "*" wildcard.
Name Summary
BILLING_ADMIN_ACTIONS Viewer + plan changes, trials, version migrations, reconcile, grants, customer details.
DEFAULT_ROLE_POLICY The default role policy applied when RolesAuthorizationOptions.policy is omitted (see the module table).
READ_ACTIONS Every read-only action (the *:read subset of ALL_ACTIONS, portal reads excluded).
RUNTIME_SERVICE_ACTIONS Server-to-server metering (/api/v1/*) for services that can’t embed the library.
SUPPORT_ACTIONS Viewer + comp/raise/disable features, grant balances, correct usage, edit customer details.
VIEWER_ACTIONS Read the catalog, customers, usage graphs and activity.
Name Documented on
ALL_ACTIONS @xtandard/entitlements