Skip to content

basalt / permissions/src / CanResourceInput

Interface: CanResourceInput ​

Defined in: permissions/src/index.ts:1145

What a meta.can resource loader receives. params, query and body are parsed by the route's schemas exactly as the handler will receive them (undefined when the route declares no schema for that part; the body is undefined for upload()/rawBody() routes, which stream it later). Typed any because the route's schemas are not visible at the meta's type.

Properties ​

body ​

> body: any

Defined in: permissions/src/index.ts:1151


container ​

> container: Container

Defined in: permissions/src/index.ts:1157

The request-scoped container.


params ​

> params: any

Defined in: permissions/src/index.ts:1147


query ​

> query: any

Defined in: permissions/src/index.ts:1149


request ​

> request: HttpRequest

Defined in: permissions/src/index.ts:1159

The raw request — headers, unparsed input.


route ​

> route: BasaltRoute

Defined in: permissions/src/index.ts:1160


tenant ​

> tenant: unknown

Defined in: permissions/src/index.ts:1155

The request's tenant (ctx().tenant), when tenancy resolved one.


user ​

> user: PolicyUser

Defined in: permissions/src/index.ts:1153

The authenticated caller (the guard answers 401 before any load).

Released under the MIT License.