Interface: RbacLocals<T, G>
Defined in: packages/sveltekit/src/server/handle.ts:46
What rbacHandle() puts on event.locals. Extend App.Locals with it in src/app.d.ts:
ts
import type { RbacLocals } from '@anievo-id/rbac-evolution-sveltekit/server'
import type { AppRbac } from '$lib/server/rbac'
declare global {
namespace App {
interface Locals extends RbacLocals<AppRbac> {}
}
}T is a names type like AppRbac (or typeof rbac); without it, any name. With per-guard names, G is the guard of the hook (its guard option): the default guard's names by default.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | Rbac<RbacTypeConfig> | DefaultRbacTypes |
G extends string | DefaultGuardName<TypesOf<T>> |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
rbac | | SubjectRbac<TypesOf<T>, ScopedGuardName<TypesOf<T>, G>> | null | Roles & permissions of the current subject. null for guests. | packages/sveltekit/src/server/handle.ts:51 |
