CheckUserAreaAccess Method Example
The following example creates the ESignature object, checks to see if the node has electronic signature enabled, obtains the user ID, checks to see if the user has access to the Electronic Signature Bypass application feature, and checks to see if the user has access to a security area (in this example, B).
Dim ESig As Object
Dim bNodeSignEnabled As Boolean
Dim UserName As String
Dim PassWord As String
Dim result As Boolean
Dim UsrId As String
'valid iFix user name and password
UserName = "username"
PassWord = "password"
result = False
'Create the ESignature object
Set ESig = CreateObject("ElectronicSignature.ESignature")
'Check if node is enabled for electronic signature
ESig.IsNodeSignEnabled bNodeSignEnabled
If bNodeSignEnabled = True Then
'Get the user id
ESig.GetUserid UserName, PassWord, UsrId
'Check if user has access to Electronic Signature Bypass application feature
ESig.CheckUserApplicationAccess UsrId, 74, result
MsgBox "User: " & UserName & vbCr & "Has rights to Bypass Signature? " & result
'Check if user has access to security area B
ESig.CheckUserAreaAccess UsrId, "B", result
MsgBox "User: " & UserName & vbCr & "Has rights to Security Area B? " & result
Else
'the hardware key is not enabled for signature, security is disabled, or bypass signature is in effect
MsgBox “Signature is not enabled on this node.”
End If