I am using the below code in Defects_ActionCanExecute, here I am restricting this particular action to a group, but that group has many users. So I want to restrict this to one particular User. Is there a way to do it?
<font class="small">Code:</font><hr /><pre>
if ActionName = "BulkTransports" then
if User.IsInGroup("Final Approver") then
Dim BugFact 'As BugFactory
Dim BugFilter 'As TDFilter
Dim BugList 'As list
Dim theBug 'As Bug
Dim i, msg
i = 0
'Get the bug factory filter
'tdc is the global TDConnection object.
Set tdc = TDConnection
Set BugFact = tdc.BugFactory
Set BugFilter = BugFact.Filter
'Set the filter values
BugFilter.Filter("BG_STATUS") = "Prod*"
BugFilter.Filter("BG_USER_27") = "Andy*"
'BugFilter.Order("BG_PRIORITY") = 1
'Create a list of defects from the filter
' and show a few of them
Set BugList = BugFilter.NewList
iCount = BugList.Count
'if theBug.Field("BG_USER_18") = "Complete" then
MsgBox "No. of Prod Transports awaiting your approval: " &iCount ,64, "Message from Quality Center"
For Each theBug In BugList
theBug.Field("BG_USER_17") = "Approved"
theBug.Field("BG_STATUS") = "Approved for Prod Transport"
theBug.Field("BG_USER_20") = Date
'MsgBox "You have Approved a Transport for Production"
i = i + 1
' MsgBox "Testing is not complete"
msg = "Number of Transports Approved for Prod: " & BugList.Count & Chr(13)
MsgBox msg ,64, "Message from Quality Center"
MsgBox "You do not have permissions to Approve Production Transports" ,16, "Warning"