AccessContext
AccessContext =
object
Defined in: packages/schema/src/access/types.ts:16
What an access rule is given: who asks, for which operation, and where.
Indexable
Section titled “Indexable”[
key:string]:unknown
Properties
Section titled “Properties”model?
Section titled “model?”
optionalmodel?:ResourceModel
Defined in: packages/schema/src/access/types.ts:29
Set by the resolver; scoped capabilities (.own) need model.owner.
operation?
Section titled “operation?”
optionaloperation?:AccessAction
Defined in: packages/schema/src/access/types.ts:20
The operation being decided.
organization?
Section titled “organization?”
optionalorganization?:object
Defined in: packages/schema/src/access/types.ts:24
With organizations, the one the request works in; .tenant resources are scoped to it already.
id:
string|number
The organization’s id.
record?
Section titled “record?”
optionalrecord?:unknown
Defined in: packages/schema/src/access/types.ts:22
The record the operation is on, when there is one.
optionaluser?:AccessUser
Defined in: packages/schema/src/access/types.ts:18
Always set by the server; optional in the type so rules stay callable with a bare context.