Skip to content

GrantResolver

katanakit-js / GrantResolver

type GrantResolver = (input) => readonly Grant[];

Defined in: core/services/grant.service.ts:22

Supplies the roles a subject holds over one resource.

Injected, never implemented here. The core must not know whether grants live in Postgres, in a shares table behind an RLS policy, or in a test fixture — and it must not know that a global role ladder and a per-resource ACL need different storage with different query shapes.

Return every grant you can see for this pair, expired or not. Expiry is evaluated by useGrantAwareCan so the rule lives in one place instead of in every caller that remembered to write it.

Parameter Type
input { resource: AccessResource; subject: AccessSubject; }
input.resource AccessResource
input.subject AccessSubject

readonly Grant[]