Skip to content

Interface: ScopedGuards<T, G> ​

Defined in: packages/hono/src/guards.ts:181

The guards returned by createGuards<T, G>() when T has per-guard names: names follow the guard each call checks in (see ScopedGuard), and the handlers get a c whose c.var.rbac is in guard G.

Type Parameters ​

Type ParameterDefault type
T extends RbacTypeConfig-
G extends stringDefaultGuardName<T>

Properties ​

PropertyTypeDefined in
canAllScopedGuard<T, G, "permission", RouteGuardOptions<GuardHandlerContext<T, G>>>packages/hono/src/guards.ts:186
canAnyScopedGuard<T, G, "permission", RouteGuardOptions<GuardHandlerContext<T, G>>>packages/hono/src/guards.ts:185
requirePermissionScopedGuard<T, G, "permission", PermissionGuardOptions<GuardHandlerContext<T, G>>>packages/hono/src/guards.ts:182
requireRoleScopedGuard<T, G, "role", RoleGuardOptions<GuardHandlerContext<T, G>>>packages/hono/src/guards.ts:183
requireRoleOrPermissionScopedGuard<T, G, "role_or_permission", RoleOrPermissionGuardOptions<GuardHandlerContext<T, G>>>packages/hono/src/guards.ts:184

Released under the MIT License. Inspired by spatie/laravel-permission.