new module:ct-services /security /Permission Key(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:ct-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:ct-services/security/PermissionService#canUserPerformAction
and module:ct-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
get Action() → {String}
Gets the permissioning action that was assigned to this instance (for example "VIEW").
Returns:
The assigned permissioning action.
- Type
- String
get Namespace() → {String}
Gets the permisssioning namespace that was assigned to this instance (for example "null").
Returns:
The assigned permissioning namespace.
- Type
- String
get Product() → {String}
Gets the product name that was assigned to this instance (for example "/FX/Major").
Returns:
The assigned product name.
- Type
- String