Skip to content

Interface: AuthzCanTupleWriteRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / AuthzCanTupleWriteRequest

Defined in: src/types/authz.ts:139

Write a can tuple: the subject holds a permission on a resource.

const tuple: AuthzCanTupleWriteRequest = {
relation: 'can',
subject: 'user:alice',
permission: 'read',
resource: 'doc:1',
};

permission: string

Defined in: src/types/authz.ts:145

The permission. Must not be empty.


relation: "can"

Defined in: src/types/authz.ts:141

Discriminant.


resource: string

Defined in: src/types/authz.ts:147

The resource the permission applies to. Must not be empty.


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.


optional when?: 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.