CTX_DataBase :: IsPermitted - Check action permission
The function returns, whether the application is allowed to call the action passed in sActionName (and sTypeName ) ( 1 ) or not ( 0 ). The function is called internally before executing an action or function.
In order to perform permission checks, those have to be implemented in the database context class, which will cache permissions by action and context class name ( sActionName , sTypeName ). Only protected actions ( protectAction() ) will be checked by calling the permitted() function. After being checked once, the action will be registered as disabled or enabled action (internal optimization). In order reset the action's enabled/disabled state (e.g. when changing the active user in an application), resetPermissions() may be called.
In order to perform application specific permission checks, the permitted() function has to be overloaded in a database context class.
When the context handle does not refer to a valid context instance the function throws an exception.