auth/permit_queries.ts view source
(deps: QueryDeps, input: GrantPermitInput): Promise<Permit> Grant a permit to an actor. Idempotent — if an active permit already exists for this actor and role, returns the existing permit instead of creating a duplicate.
deps
query dependencies
input
the permit fields
returns
Promise<Permit> the created or existing active permit