BaseContext :: permitted - Check access permission
The function returns, whether the application is allowed to call the action passed in sActionName (1) or not (0). The function is called internally before executing an action or function.
In order to perform permission checks by the application, the permitted() function has to be overloaded in a user specific context class. When not being overloaded, the function call is passed to the database or project context adding the context type name, i.e. one may perform permission checks in database and/or project context completely instead in each context class separately.
The function may also be called by the application in order to check, whether the action is allowed.
When the context handle does not refer to a valid context instance the function throws an exception.
Implementation overview
- Check access permission
BaseContext :: permitted ( sActionName ) - Check access permission
BaseContext :: permitted ( sActionName, sTypeName )
Implementation details
-
Check access permission
int32 BaseContext  :: permitted ( odaba::String &sActionName )
The function checks the access permission for the current context class, i.e. the type name is the context class name.
- sActionName
- Action name
The action name is a name of an action implemented in the context class related to the database source or implemented as default action. Actions can be implemented as expressions, as C++ functions or as .NET function.
In order to pass no action name, an empty string ( String() ) may be passed.
to list
- sActionName
- Action name
-
Check access permission
int32 BaseContext  :: permitted ( odaba::String &sActionName, odaba::String &sTypeName )
The function checks the permission in the context of the context class passed in sTypeName. This may differ from the current context.
- sActionName
- Action name
The action name is a name of an action implemented in the context class related to the database source or implemented as default action. Actions can be implemented as expressions, as C++ functions or as .NET function.
In order to pass no action name, an empty string ( String() ) may be passed.
- sTypeName
- Type name
The type name is the name of a data type (usually) defined in the database. The type name might be passed as simple identifier or as scoped name with preceding namespace names separated by double colon '::'.
In order to pass no type name, an empty string ( String() ) may be passed.
to list
- sActionName
- Action name