Manage Learn to apply best practices and optimize your operations.

Send your self an ACL for any user on a given server

Use this to send your self a TXT file attachment with all ACL entries for a certain user on any given server.

Use this to send your self a TXT file attachment with all ACL entries for a certain user on any given server.
1. Create a form with three editable fields:


2.add a button on the form:
@Command( [ToolsRunMacro] ; "ACL")

3. Create a schedule on never agent:

Sub Initialize 
     On Error Resume Next 
     Dim workspace As New NotesUIWorkspace 
     Dim uidoc As NotesUIDocument 
     Set uidoc = workspace.CurrentDocument 
Dim directory As New NotesDbDirectory(server$) 
     Dim db As NotesDatabase 
     Set db = directory.GetFirstDatabase( DATABASE ) 
     Dim acl As NotesACL,session As New notessession 
     Dim entry As NotesACLEntry,myLevel As String,t1 As Integer,myFile As String 
     myFile = "C:myACL.txt" 
     Open myFile For Output As #1 

While Not(db Is Nothing) 
          Call db.Open("","") 
          Set acl = db.ACL 
          Set entry=acl.GetFirstEntry 
          Set notesName = New NotesName( 
          Do Until entry Is Nothing 
               If notesName.common+"/CST"=user$ Then 
                    Print #1,"*****************************************************************************************************************" 
                    Print #1,db.title;Tab(50);db.filename 
                    Print #1,"*****************************************************************************************************************" 
                    t1 = entry.level 
                    If t1=6 Then myLevel = "Manager" 
                    If t1=5 Then myLevel="Designer" 
                    If t1=4 Then myLevel="Editor" 
                    If t1=3 Then myLevel = "Author" 
                    If t1=2 Then myLevel = "Reader" 
                    If t1=1 Then myLevel = "Depositor" 
                    If t1=0 Then myLevel = "No Access" 
                    Print #1,;Tab(50);myLevel 
                    Print #1,"Can Create Documents="+Cstr(Entry.CanCreateDocuments) 
                    Print #1,"Can Create Personal Agent="+Cstr(Entry.CanCreatePersonalAgent) 
                    Print #1,"Can Create Personal Folder="+Cstr(Entry.CanCreatePersonalFolder) 
                    Print #1,"Can Delete Documents="+Cstr(Entry.CanDeleteDocuments) 
                    Print #1,"Is Public Reader="+Cstr(Entry.IsPublicReader) 
                    Print #1,"Is Public Writer="+Cstr(Entry.IsPublicWriter) 
                    Forall y In entry.roles 
                         If y = "" Then 
                              Print #1," . . . role: " & y 
                         End If 
                    End Forall 
                    Print #1," " 
                    Print #1,"---------------------------------------------------------------------------------------------------" 
                    Print #1," " 

' Close #1 
                    Print "File written to " & myFile 
               End If 
               Set entry = acl.GetNextEntry(entry) 
               Set notesName = New NotesName( 

Set db = directory.GetnextDatabase 

     Close #1 

Dim thisdb1 As notesdatabase 
     Set thisdb1 = Session.CurrentDatabase 

Set doc = New NotesDocument(thisdb1) 
     Set rtitem = New NotesRichTextItem( doc, "Body" ) 
     Dim recipients( 1 To 3 ) As String 
     recipients (1) = send2$ 
        MessageSubject = "ACL List On " +server$+" For "+user$ 
     MessageBody = "Here is the file attachment for an ACL you queried. " 
     doc.Body = MessageBody 
     Set object = rtitem.EmbedObject (EMBED_ATTACHMENT,"",myFile,"Attachment1") 
     doc.Form = "Main Topic" 
     doc.Subject = MessageSub
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...