Function rolesAllowed

  • 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.

    Parameters

    • Rest ...roleNames: string[]

      Names of roles that are permitted to use the endpoint.

    Returns ((classDefinition, methodName) => void)

      • (classDefinition, methodName): void
      • Parameters

        • classDefinition: Object | Function
        • methodName: string

        Returns void

Generated using TypeDoc