As I needed to export the ACL of a Lotus Domino database to a textfile, I wrote (with great help of Mirador) the following piece of code:
Sub Initialize
' Server and database
Dim db As New NotesDatabase( "" , "database.nsf" )
Dim acl As NotesACL
Dim currententry As NotesACLEntry
Dim currentLog As New NotesLog( "" ) 'Logfile prefix
Dim FoundRoles As Variant
Dim intRole As String
currentLog.OverwriteFile = True
' Location of the logfile
Call currentLog.OpenFileLog( "C:textfile.txt" )
' this is to set the variable to "point"
' to the ACL of the database
Set acl = db.ACL
Set currententry = acl.GetFirstEntry
' get the first ACL entry in the database
While Not currententry Is Nothing
Call currentLog.LogAction(currententry.Name)
FoundRoles = currententry.Roles
Dim i As Integer
For i =0 To Ubound(FoundRoles)
Print "3: "
Call currentLog.LogAction(FoundRoles(i))
Next
Set currententry = acl.GetNextEntry(currententry)
Wend
End Sub
Many thanks to Mirador!
If you have any questions, mail them to domino at evenflow.nl
Recent Comments