GrantResolver
katanakit-js / GrantResolver
Type Alias: GrantResolver
Section titled “Type Alias: 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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ resource: AccessResource; subject: AccessSubject; } |
input.resource |
AccessResource |
input.subject |
AccessSubject |
Returns
Section titled “Returns”readonly Grant[]