Indicates whether the connected user is allowed to perform one or more tasks. The IDs of the tasks for which you want to return the user’s access rights are passed as an array.
To determine whether the connected user is allowed to perform one specific task, you can use IsConnectedUserAllowedToPerformTask. |
<HsvSecurityAccess>.GetTaskAccessForConnectedUserFromList varalTaskIDs, pvarabHasAccess
Long array (ByVal). The array of task IDs. Use the IDs listed in Task Constants. | |
Variant array. Indicates whether the connected user has rights to the tasks passed in the varalTaskIDs argument; the two arrays have a one-to-one correspondence. The array is returned as a Boolean subtype: an element is TRUE if the user has rights to the task, FALSE otherwise. |
The following example tests whether the connected user has rights to the Create Application, Define Application Profile, and Delete Application tasks. For each of these tasks, if the user has rights, any code placed within the If structure would be executed.
Dim laTaskIDs(2) As Long, vaRights
laTaskIDs(0) = HFM_TASK_APPLICATION_CREATE_APPLICATION
laTaskIDs(1) = HFM_TASK_APPLICATION_DEFINE_APPLICATION_PROFILE
laTaskIDs(2) = HFM_TASK_APPLICATION_DELETE_APPLICATION
'g_cSecurity is an HsvSecurityAccess object reference
g_cSecurity.GetTaskAccessForConnectedUserFromList laTaskIDs, _
vaRights
For i = 0 To UBound(laTaskIDs)
If vaRights(i) = True Then
…
End If
Next i