Index

src/PermitGrant.decorator.ts

PermitGrantArgs
PermitGrantQuery | "undefined"

src/types.ts

TExtractUserFromRequest

The extractUserFromRequest callback extracts and returns an IUser {id: TId; roles: string[]}.

Usually our User is in req.user object or similar, placed by our authentication middleware. Alternatively you can use something like request-context or its newer cls-hooked incarnations etc.

If req.user complies already, you can omit this callback as defaultExtractUserFromRequest does it for you.

You can use also to inject test or hardcode environment users etc.

function
TProjectTo

Project from one value to another, used to project req to our ResourceId (projectResourceId)

function

result-matching ""

    No results matching ""