Gets a list of user application access structures, which contain information about user access to applications.
Syntax
EsbGetApplicationAccess (hCtx, User, AppName, pItems) ByVal hCtx As Long ByVal User As String ByVal AppName As String pItems As Integer
Parameter | Description |
---|---|
hCtx | VB API context handle. |
User | User name. If an empty string, lists all users for the specified application. |
AppName | Application name. If an empty string, lists all applications for the specified user. |
pItems | Address of variable to receive Items of user application structures. |
Notes
If User is an empty string, all users are listed for the specified application. If AppName is an empty string, all applications are listed for the specified user. However, User and AppName cannot both be an empty string
The Access field of the user application structure is used to represent the user's granted access to the application, whereas the MaxAccess field represents the user's highest access from all sources (e.g. via groups or default application access etc.).
Return Value
If successful, returns a Items of users/applications in pItems, and generates a list of user application structures accessible via EsbGetNextItem()
Access
This function requires the caller to have application Design privilege (ESB_PRIV_APPDESIGN) for the specified application, unless they are getting their own application access information.
Example
Declare Function EsbGetApplicationAccess Lib "ESBAPIN" (ByVal hCtx As Long, ByVal User As String, ByVal AppName As String, Items As Integer) As Long Sub ESB_GetApplicationAccess () Dim Items As Integer Dim AppName As String Dim User As String Dim UserApp As ESB_USERAPP_T Dim sts As Long AppName = "Demo" User = "Joseph" '*********************** ' Get Application Access '*********************** sts = EsbGetApplicationAccess (hCtx, User, AppName, Items) For n = 1 To Items '********************************* ' Get next User Application Access ' structure from the list '********************************* sts = EsbGetNextItem (hCtx, ESB_USERAPP_TYPE, UserApp) Next End Sub
See Also