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.


Parameter Type Default Notes
permission Required Permission
context Required IArcGISContext
entityOrOptions Optional EntityOrOptions


Property Type Notes
checks IPolicyCheck[]

List of all the policies that were checked, and their responses For debugging / observability

policy Permission

Permission being checked

access Inherited boolean

Is the user allowed to perform the action

code Inherited string

Code for the access response. Used for i18n and UX level messages

response Inherited PolicyResponse

Reason for the access response

message Optional Inherited string

Message with details access response. Typically used to return additional information about assertion failures

Function defined in common/src/permissions/checkPermission.ts:44