Caplin Trader 4.8.0

Class: module:caplin/trading/validation/PermissionValidator

module:caplin/trading/validation/PermissionValidator

Constructor

new module:caplin/trading/validation/PermissionValidator()

The constructor for the PermissionValidator. The PermissionValidator is a module:caplin/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:caplin/services/security/PermissionService singleton whether the current user has the correct permissions to trade.
Parameters:
Name Type Description
oDataToValidate module:caplin/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:caplin/trading/validation/ValidationResult The object used to report permission failure. Must not be null or undefined.
Implements: