Caplin Trader 4.8.0

Class: module:caplin/services/security/PermissionKey

module:caplin/services/security/PermissionKey

Constructor

new module:caplin/services/security/PermissionKey(sProduct, sNamespaceopt, sAction)

Creates a new PermissionKey. This class holds permissioning data that identifies an action on a product in a namespace. An instance of this class is returned by the getPermissionKey() method of components that implement the module:caplin/component/Component interface.

In order to determine the permissions assigned to a user, the permissioning data returned by the methods of this class can be passed as parameters to module:caplin/services/security/PermissionService#canUserPerformAction and module:caplin/services/security/PermissionService#addPermissionListener.

Parameters:
Name Type Attributes Description
sProduct String The product name that will be assigned to this instance (for example "/FX/Major").
sNamespace String <optional>
The permissioning namespace that will be assigned to this instance (for example "null"). If "null", then the assigned permission resides in the global (default) namespace.
sAction String The permissioning action that will be assigned to this instance (for example "VIEW").

Methods

getAction() → {String}

Gets the permissioning action that was assigned to this instance (for example "VIEW").
Returns:
The assigned permissioning action.
Type
String

getNamespace() → {String}

Gets the permisssioning namespace that was assigned to this instance (for example "null").
Returns:
The assigned permissioning namespace.
Type
String

getProduct() → {String}

Gets the product name that was assigned to this instance (for example "/FX/Major").
Returns:
The assigned product name.
Type
String