Skip to content
0

katanakit-js / GrantResolver

Type Alias: GrantResolver ​

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

Defined in: src/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 ​

ParameterType
input{ resource: AccessResource; subject: AccessSubject; }
input.resourceAccessResource
input.subjectAccessSubject

Returns ​

readonly Grant[]

Released under the MIT License.