Interface: Guards<T, C>
Defined in: packages/trpc/src/guards.ts:155
The guards returned by createGuards<T>(), with names narrowed by T (see RbacTypeConfig). After them, ctx.rbac is a SubjectRbac with the names of T.
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends RbacTypeConfig | DefaultRbacTypes |
C | RbacProcedureContext |
Properties
| Property | Type | Defined in |
|---|---|---|
canAll | Guard<PermissionsOf<GuardTypes<T, DefaultGuardName<T>>>, RouteGuardOptions<GuardSubject<T>>, GuardSubject<T>, C> | packages/trpc/src/guards.ts:165 |
canAny | Guard<PermissionsOf<GuardTypes<T, DefaultGuardName<T>>>, RouteGuardOptions<GuardSubject<T>>, GuardSubject<T>, C> | packages/trpc/src/guards.ts:164 |
requirePermission | Guard<PermissionsOf<GuardTypes<T, DefaultGuardName<T>>>, PermissionGuardOptions<GuardSubject<T>>, GuardSubject<T>, C> | packages/trpc/src/guards.ts:156 |
requireRole | Guard<RolesOf<GuardTypes<T, DefaultGuardName<T>>>, RoleGuardOptions<GuardSubject<T>>, GuardSubject<T>, C> | packages/trpc/src/guards.ts:157 |
requireRoleOrPermission | Guard< | PermissionsOf<GuardTypes<T, DefaultGuardName<T>>> | RolesOf<GuardTypes<T, DefaultGuardName<T>>>, RoleOrPermissionGuardOptions<GuardSubject<T>>, GuardSubject<T>, C> | packages/trpc/src/guards.ts:158 |
