Labels

Monday, June 11, 2012

How to Remove role using OTA API functions in HP Quality Center?

Dim User As CustomizationUser
Dim UserList As List
Dim username
Dim i As Integer
Set cust = tdc.Customization
Set Users = cust.Users 'CustomizationUsers object
Set UserList = Users.Users 'The list of customization users
totalusers = UserList.Count 'Number of Users in the list of customization users
If totalusers > 0 Then
i = 2
'For Each username In UserList

'username.Name
Set User = Users.User(user Id)

If User.GroupsList.Count >= 2 Then
If User.InGroup("Role") Then
User.RemoveFromGroup ("Role")
End If
End If
'Next
End If
On Error GoTo 0
Next

No comments:

Post a Comment