- rolesAllowed(...roleNames): ((classDefinition, methodName) => void)
-
Parameters
-
Rest
...roleNames: string[]
Returns ((classDefinition, methodName) => void)
-
- (classDefinition, methodName): void
-
Parameters
-
classDefinition: Object | Function
-
methodName: string
Returns void
Decorator for an endpoint method that defines roles that are allowed to use it.
Overrides the controller roles set by the
controllerRolesAllowed
decorator, if any.Role based authorization is managed by an
IAuthorizer
implementation registered with the current app.