Skip to content

IQueryInfo

Defined in: src/types/IQueryInfo.ts:11

An interface that defines an access information to be queried. When you start a method chain with AccessControl#can method, you’re actually building this query object which will be used to check the access permissions.

optional role?: string | string[]

Defined in: src/types/IQueryInfo.ts:15

Indicates a single or multiple roles to be queried.


optional resource?: string

Defined in: src/types/IQueryInfo.ts:19

Indicates the resource to be queried.


optional action?: string

Defined in: src/types/IQueryInfo.ts:24

Defines the type of the operation that is (or not) to be performed on the resource by the defined role(s).


optional possession?: Possession

Defined in: src/types/IQueryInfo.ts:28

Defines the possession of the resource for the specified action.


optional context?: UnknownObject

Defined in: src/types/IQueryInfo.ts:34

Per-check context data, readable from conditions via $.. Merged over the constructor’s ambient context (per-check wins). Used by the one-shot AccessControl#check() form.