ui/RoleGrantOfferForm.svelte

Grantor-side role_grant offer form.

Caller supplies to_account_id, the subset of roles the grantor may offer (typically filtered by admin-grant-path — RoleSpec.grant_paths includes 'admin'), an optional scope — scope_kind and scope_id together, or neither for a global offer — and an optional on_created callback for post-submit UX. Errors from the RPC surface their distinct reason codes (self-target, role-not-grantable, not-authorized, a scoped builtin role, actor mismatches) so consumers can render them appropriately.

view source

Declarations
#

RoleGrantOfferForm
#

ui/RoleGrantOfferForm.svelte view source

import RoleGrantOfferForm from '@fuzdev/fuz_app/ui/RoleGrantOfferForm.svelte';

scope_kind?

type string | null
optional

scope_id?

type Branded | null
optional

to_account_id

type Branded

to_actor_id?

Narrow the offer to a specific actor on to_account_id. Omit (or null, the default) for the account-grain default — any actor on the recipient account may accept.

type Branded | null
optional default null

roles

Roles the caller may offer — caller filters upstream (default: admin-grant-path).

type string[]

on_created?

type (offer: { id: Branded<string, "Uuid">; from_actor_id: Branded<string, "Uuid">; to_account_id: Branded<string, "Uuid">; to_actor_id: Branded<string, "Uuid"> | null; ... 11 more ...; resulting_role_grant_id: Branded<...> | null; }) => void
optional
snippet parameters

format_role?

type (role: string) => string
optional default (role: string) => role
snippet parameters
role string

Depends on
#