Setu-TS
    Preparing search index...

    Interface ScopedRbacOptions

    Scoped RBAC configuration (AuthPluginOptions.scopedRbac).

    0.9.0

    interface ScopedRbacOptions {
        customRoles?: IScopedRoleSource | RegistryFactory<IScopedRoleSource>;
        grantableIn?: Readonly<Record<string, ScopedRoleLimit>>;
        inheritsFrom?: (
            scope: ScopeRef,
            signal: AbortSignal,
        ) => readonly ScopeRef[] | Promise<readonly ScopeRef[]>;
        maxCustomRoles?: number;
        maxGrantsPerPrincipal?: number;
        maxPermissionsPerRole?: number;
        maxScopeDepth?: number;
        maxScopeNodes?: number;
        permissions?: readonly string[];
        principalAuthorityIsGlobal?: boolean;
        sources: readonly GrantSourceConfig[];
        sourceTimeoutMs?: number;
        tenantScopeType?: string;
        timing?: ScopedRbacTiming;
    }
    Index

    Per-scope custom roles, bundling catalogue permissions only.

    grantableIn?: Readonly<Record<string, ScopedRoleLimit>>

    Where each limited role may be granted. A role absent here is unlimited.

    inheritsFrom?: (
        scope: ScopeRef,
        signal: AbortSignal,
    ) => readonly ScopeRef[] | Promise<readonly ScopeRef[]>

    The scopes whose grants ALSO apply in scope — its parent, a delegating tenant. Walked transitively; a cycle, or exceeding maxScopeDepth or maxScopeNodes, denies. Absent: scopes are flat.

    maxCustomRoles?: number

    The most custom roles one scope may define, 1–10 000 (default 128); more denies.

    maxGrantsPerPrincipal?: number

    The most grants one resolution may return, 1–10 000 (default 256); more denies.

    maxPermissionsPerRole?: number

    The most permissions one custom role may bundle, 1–10 000 (default 256); more denies.

    maxScopeDepth?: number

    The deepest inheritsFrom walk, 1–64 (default 8); deeper denies.

    maxScopeNodes?: number

    The most scopes one walk may visit, 1–1 024 (default 32); more denies.

    permissions?: readonly string[]

    Catalogue permissions no rbac role names, made checkable.

    principalAuthorityIsGlobal?: boolean

    Whether the authority a principal carries itself — its roles and its permissions (including '*') — counts in EVERY scope (M113e, V9-28). Default false: a scoped check is decided by grants alone, so a token role admin does not pass requireScopedRole('admin') in a tenant that granted it nothing. true restores the behaviour before 0.10.0: each principal role is a global grant (still limited by grantableIn) and each principal permission satisfies every scoped permission check. The unscoped guards (requireRole, requirePermission) read the principal either way.

    0.10.0

    sources: readonly GrantSourceConfig[]

    The grant sources, unioned. At least one.

    sourceTimeoutMs?: number

    The deadline on every source and resolver call, 1–60 000 ms (default 2 000).

    tenantScopeType?: string

    The scope type compared against the resolved request tenant (default 'tenant'): a check whose own scope is of this type and names another tenant denies.

    When grants are resolved (default 'request').