How can i retrieve the list of user-names enlisted in ACL having a specific role?

Hi All,

How can i retrieve the list of user-names enlisted in ACL having a specific role?

Plz help…it is urgent…

Thanks in advance.

Arnab

Subject: How can i retrieve the list of user-names enlisted in ACL having a specific role?

Hi,Here is a way to find that:

Dim s as New NotesSession

Dim db as NotesDatabase

Dim acl as NotesACL

Dim acle As NotesACLEntry

Set db = s.currentdatabase

Set acl = db.ACL

Set acle = acl.getFirstEntry

while not acle is nothing

  if acle.IsRoleEnabled("[role_name]") then



      ' if you get here then role is enabled for this acl entry 

      ' you have the name of the group or user in acle.Name

      ' do some job, add to an array ...



  end if

  Set acle = acl.getNextEntry( acle )

wend

Hope it helps,

Arnaud

Subject: RE: How can i retrieve the list of user-names enlisted in ACL having a specific role?

You may also use the db method:

roles = notesDatabase.QueryAccessRoles( username$ )