Constructor
new module:caplin/services/testing/PermissionServiceStub()
Constructs a
PermissionServiceStub
.
Methods
-
addRegistrationListener(callback)
-
Allows the user to register a callback method that will be caled every time addPermissionListener() is called this enable a workbench tool to update its GUI.
Parameters:
Name Type Description callback
function Method to be called any time addPermissionListener is called -
allow()
-
Notifies the appropiate listeners that a permission defined by namespace, product and action is allowed
-
deny()
-
Notifies the appropiate listeners that a permission defined by namespace, product and action is denied
-
setAllPermissionsForProductSets(m_permissionedProducts)
-
This method allows you to override the existing list of product sets. Product set listeners will be notified about product sets changes.
Parameters:
Name Type Description m_permissionedProducts
Object Product set map. Each key will represent a namespace and its value will be an array of products. -
setProductSetsPermissions(namespace, products)
-
Allows to set product sets permissions. It will callback on the product sets listeners registered for the given namespace.
Parameters:
Name Type Description namespace
String Namespace identifying the product set. products
Array Array of products for the given namespace.