@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";Functions
Section titled “Functions”| Name | Summary |
|---|---|
rolesAuthorization |
Create a role-based AuthorizationProvider. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
RolesAuthorizationOptions |
Options for rolesAuthorization. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
RolePolicy |
A role policy: each role maps to an explicit action list or the "*" wildcard. |
Variables
Section titled “Variables”| 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. |
Re-exports
Section titled “Re-exports”| Name | Documented on |
|---|---|
ALL_ACTIONS |
@xtandard/entitlements |