Setu-TS
    Preparing search index...

    Function scopeFromTenant

    • The scope of the request's resolved tenant (ctx.request.tenant, written by the multi-tenancy middleware). Unresolved — so the check denies — when no tenant was resolved. The default scope source of every scoped guard.

      Parameters

      • type: string = 'tenant'

        The scope type to give the tenant (default 'tenant')

      Returns (ctx: IRequestContext) => ScopeRef | undefined

      A scope source

      When type is not lowercase kebab-case

      requireScopedPermission('invoices:approve', { scope: scopeFromTenant() });
      

      0.9.0