ACL - Displaying list on web

Sorry, I’ve read the docs and can’t see how to display the ACL list on the web - can this be done?

Basically so that a user can know who are a db’s authors are, without this having to be manually written.

Subject: ACL - Displaying list on web

Read up on NotesACL and NotesACLEntry Classes.

You could have a Web Query Open Agent that gets the NotesACl Class. Get the first NotesACLEntry using NotesACL.GetFirstEntry, get the name, Access level and roles using NotesACLEntry.Name, NotesACLEntry.Level and NotesACLEntry.Roles. Then loop through the other ACL entries using NotesACL.GetNextEntry

HTH

Subject: RE: ACL - Displaying list on web

Try this for starters. Put this code in an agent and execute via the web.

Sub Initialize

Dim s As New notessession

Dim db As NotesDatabase



Set db = s.CurrentDatabase



Dim acl As NotesACL

Dim entry As NotesACLEntry

Set acl = db.ACL



Dim roles As Variant

Dim userLevel As Integer



Set entry = acl.GetFirstEntry

While Not (entry Is Nothing)

	

	Print "<b>" & entry.Name & "</b>"

	Print "<br>"

	

	'Print Access Level

	userLevel = entry.Level

	Print "Users Access Level = "

	Select Case userLevel

	Case 0      			 : Print "No Access"

	Case 1		    		 : Print "Depositor"

	Case 2				 : Print "Reader"

	Case 3				 : Print "Author"

	Case 4				 : Print "Editor"

	Case 5				 : Print "Designer"

	Case 6				 : Print "Manager"

	End Select

	

	Print "<br><br>"

	

	'Print the roles assigned to this acl entry

	Print "Users Roles:"

	Print "<br>"

	roles = entry.Roles

	Forall x In roles

		Print x

		Print "<br>"

	End Forall

	Print "<hr>"

	

	Set entry = acl.GetNextEntry( entry )	

Wend

End Sub