Caplin Trader 5.1.0

Class: module:ct-trading/validation/PermissionValidator

module:ct-trading/validation/PermissionValidator()

new module:ct-trading/validation/PermissionValidator()

The constructor for the PermissionValidator.

The PermissionValidator is a module:ct-trading/validation/Validator that is used during a trade to determine whether the user is permissioned to do a trade or not.
This class is immutable.

Implements:

Methods

validate(oDataToValidate, oValidationResult)

Checks with the registered module:ct-services/security/PermissionService singleton whether the current user has the correct permissions to trade.

Parameters:
Name Type Description
oDataToValidate module:ct-trading/trademodel/DataHolder

is trading data supplied by the trade such as the instrument, the trading protocol and the asset class. Must not be null or undefined.

oValidationResult module:ct-trading/validation/ValidationResult

The object used to report permission failure. Must not be null or undefined.

Implements: