auth/permit_offer_actions.ts view source
(auth: RequestContext, input: { to_account_id: string; role: string; scope_id: string | null; }, deps: Pick<RouteFactoryDeps, "log">, ctx: ActionContext): boolean | Promise<...> Authorization callback that admits any admin and otherwise falls back to the symmetric default (caller must hold the offered role globally).
The web_grantable filter in create_handler runs before the
authorize callback, so this never sees non-web-grantable roles. Drop
into create_permit_offer_actions({authorize: authorize_admin_or_holder})
(or any factory that forwards authorize, e.g. create_standard_rpc_actions)
for the common "admins offer anything; users offer what they hold"
pattern. Scope-aware policies (e.g. classroom_teacher offering
classroom_student in their own scope) wrap this and short-circuit true
before delegating.
auth
input
{ to_account_id: string; role: string; scope_id: string | null; }deps
Pick<RouteFactoryDeps, "log">ctx
returns
boolean | Promise<boolean>