hab da was ähnliches bei mir ausgegraben....
das script untersucht ob sich der übergebene user in gruppen befindet die den übergebenen string zumindest zum teil enthalten - müßtest du halt anpassen
Function CheckGroup4User(group As String, user As String)
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim vw As NotesView
Dim i As Integer, it As Integer
Dim Members As Variant
Dim docName As String
Set db = New NotesDatabase(CurrentServer(), "NAMES.nsf")
Set vw = db.getview("Groups")
it = 0
Set doc = vw.GetDocumentByKey(group, True)
If doc Is Nothing Then
CheckUser4Group = 0
Exit Function
End If
' Messagebox("In Gruppe: " + doc.ColumnValues(1) + ", Name: " + user)
members = doc.GetItemValue("Members")
For i = 0 To Ubound(members)
' Messagebox("Member: " + members(i))
If Strcompare(members(i), user, 5) = 0Then
it = 1
Elseif Strcompare(Right(members(i), 3), "=AT", 5) <> 0 Then
it = CheckGroup4User(members(i), user)
End If
If it <> 0 Then Exit For
Next i
CheckGroup4User = it
End Function
Function CheckGroupMembers4(groups As String)
Dim db As NotesDatabase
Dim session As New NotesSession
Dim doc As NotesDocument
Dim vw As NotesView
Dim it As Integer
Dim Members As Variant
Dim UName As String, docName As String
Dim NName As New NotesName(session.UserName)
Set db = New NotesDatabase(CurrentServer(), "NAMES.nsf")
Set vw = db.getview("Groups")
Call vw.FTSearch("FIELD ListName CONTAINS """ + groups + """")
it = 0
UName = NName.Canonical
Set doc = vw.GetFirstDocument
' Messagebox("Name: " + UName)
Do While Not (doc Is Nothing)
If doc.GroupType(0)="0" Then
docName = doc.ColumnValues(1)
' Messagebox ("findet:"+docName)
it = CheckGroup4User(docName, UName)
If it Then Exit Do
End If
Set doc = vw.GetNextDocument(doc)
Loop
CheckGroupMembers4 = it
End Function
Function CurrentServer() As String
Dim workspace As New NotesUIWorkspace
Dim dbui As NotesUIDatabase
Dim db As NotesDatabase
Set dbui = workspace.CurrentDatabase
Set db = dbui.DataBase
CurrentServer = db.Server
End Function