Interface: AuthzCanTupleWriteRequest
@kortexya/reasoninglayer / AuthzCanTupleWriteRequest
Interface: AuthzCanTupleWriteRequest
Section titled “Interface: AuthzCanTupleWriteRequest”Defined in: src/types/authz.ts:139
Write a can tuple: the subject holds a permission on a resource.
Example
Section titled “Example”const tuple: AuthzCanTupleWriteRequest = { relation: 'can', subject: 'user:alice', permission: 'read', resource: 'doc:1',};Properties
Section titled “Properties”permission
Section titled “permission”permission:
string
Defined in: src/types/authz.ts:145
The permission. Must not be empty.
relation
Section titled “relation”relation:
"can"
Defined in: src/types/authz.ts:141
Discriminant.
resource
Section titled “resource”resource:
string
Defined in: src/types/authz.ts:147
The resource the permission applies to. Must not be empty.
subject
Section titled “subject”subject:
string
Defined in: src/types/authz.ts:143
The subject the grant is about (e.g. user:alice, group:eng). Must not be empty.
optionalwhen?:string
Defined in: src/types/authz.ts:153
Optional validity annotation, carried as a feature and opaque to the
engine. Not part of the tuple’s identity: re-writing with another when
updates the same tuple.