Skip to main content

Function: RequiresRole()

RequiresRole(roles): (target, propertyKey, descriptor) => void

Defined in: service-core/src/decorators/RouteDecorators.ts:351

Indicates that the client must be an authenticated user with at least one of the specified role(s) to process the request.

Parameters

roles

string | string[]

The role(s) that an authenticated user must have to make the request.

Returns

(target, propertyKey, descriptor) => void