@xtandard/flags/authorization/roles
Role-based authorization: rolesAuthorization maps roles to the actions they
grant (DEFAULT_ROLE_POLICY: admin, editor, viewer), with a read-only switch.
Entry point for the @xtandard/flags/authorization/roles subpath export.
import { … } from "@xtandard/flags/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 |
|---|---|
ALL_ACTIONS |
Every action in the system, used to expand non-wildcard “all actions” presets. |
DEFAULT_ROLE_POLICY |
The default role policy applied when RolesAuthorizationOptions.policy is omitted. |
READ_ACTIONS |
Every read-only action (the *:read subset of ALL_ACTIONS). |