Manage Learn to apply best practices and optimize your operations.

How To Find All Persons (In Acl) Which Have A Specific Role

This function allows to find all personns in the db's ACL which have a specific
Function WhosRole( sRole As String) As Variant

' This function browse the entire ACL for
' retrieving all personns who have the role
' passed in the parameter "sRole"

' It returns an array, filled with the names,
' or with the first element blank if no one has
' this role

' BACKEND objects Declaration
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry

' Variables Declaration
Dim cpt As Integer
Dim sResult As String
Dim TabDest() As String

If sRole = "" Then

Messagebox "Parameter <&LTRole>> is required for the WhosRole function"


Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetFirstEntry

sResult = ""
Do Until entry Is Nothing
If entry.IsRoleEnabled( sRole ) Then
Redim Preserve TabDest(cpt)
End If
Set entry = acl.GetNextEntry( entry )

If cpt = 0 Then
Messagebox "Sorry, nobody has the role " & sRole & " in this database
ACL", 16, "ACL Error"
Redim Preserve TabDest(0)
TabDest(0) = ""
End If

WhosRole = TabDest

End If

End Function

Dig Deeper on Domino Resources - Part 5



  • 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 ...