checkPermission
Check a permission against the system policies, and possibly an entity policy
Note: Calls that fail will automatically be logged to the console. Additional
context for the call can be passed via .label on the entityOrOptions argument.
Parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
| permission Required | Permission | ||
| context Required | IArcGISContext | ||
| entityOrOptions Optional | EntityOrOptions |
Returns
| Property | Type | Notes |
|---|---|---|
| IPolicyCheck[] |
List of all the policies that were checked, and their responses For debugging / observability |
|
| Permission |
Permission being checked |
|
| Inherited | boolean |
Is the user allowed to perform the action |
| Inherited | string |
Code for the access response. Used for i18n and UX level messages |
| Inherited | PolicyResponse |
Reason for the access response |
| Optional Inherited | string |
Message with details access response. Typically used to return additional information about assertion failures |
Function defined in packages/common/src/permissions/checkPermission.ts:75