User Authority Access Service
The Framework services manager provides a facility to access the current user's authority to a nominated object. For example, this service can be used to help a component decide whether to enable or disable buttons or switches. It is available only to Windows applications.
In Windows applications the current user's authority to an object is retrieved using the avCheckUserAuthority method.
Method avCheckUserAuthority ParametersName | Usage |
To |
Mandatory. Use this parameter to specify the type of the object to be checked. Allowable values are APPLICATION, BUSINESSOBJECT and COMMAND. Values may be specified in any case. |
Named |
Mandatory. The User Object Name / Type of the object to be checked. |
InContext |
Optional and required only for commands. Use this parameter to specify The User Object Name / Type of the object the command is associated with. Defaults to the current object. |
ReturnValue |
Mandatory. Returned as true or false. True means the user has authority to use the object and false means the user doesn't. |
Examples of Authority Checks on Objects
Check the authority of the current user to the Demo application and return the answer to the variable #STD_BOOL:
Invoke Method(#avFrameworkManager.avCheckUserAuthority) To(APPLICATION) Named(DEMO) ReturnValue(#Std_Bool)
Check the authority of the current user to the Organization business object and return the answer to the variable #STD_BOOL:
Invoke Method(#avFrameworkManager.avCheckUserAuthority) To(BUSINESSOBJECT) Named(DEM_ORG) ReturnValue(#Std_Bool)
Check the authority of the current user to the 'Details' command of the Resources business object and return the answer to the variable #STD_BOOL:
Invoke Method(#avFrameworkManager.avCheckUserAuthority) To(COMMAND) InContext(DEM_ORG_SEC_EMP) Named(DETAILS) ReturnValue(#Std_Bool)
Check the authority of the current user to the 'Details' command of the current object and return the answer to the variable #STD_BOOL.
Invoke Method(#avFrameworkManager.avCheckUserAuthority) To(COMMAND) Named(DETAILS) ReturnValue(#Std_Bool)