Use ACL entries for choices in Web

Authors, Names and Readers fields have choices formula of "Use Access Control List for choices". But this only works in Notes Client. Now, here's how to use this feature in the Web using Lotus Script. All you have to do is to call the agent in the WebQueryOpen event of the form. This tip is useful especially if you want to set a readers or authors field based on the ACL of a database.

In the form that has the field named fieldACLEntries, it can be a checkbox, combo box, Listbox, and setting for choices for the field must be Use Formula for choices and the formula must be the name of the field itself. You can also use @Name([CN];fieldACLEntries) in the formula of the field to get only the canonical name of the Entries.

Dim session as New NotesSession
Dim db as NotesDatabase
Set db=session.currentdatabase
Dim acl as NotesACL
Dim Entry as NotesACLEntry
Set acl=db.ACL
Set Entry=acl.GetFirstEntry
Dim aclentries as variant
Redim aclentries(0)

While Not(Entry Is Nothing) 
 If (Entry.IsPerson) Then
  If (ctr<>0) Then
   Redim Preserve aclentries(Ubound (aclentries)+1)
  End If
 End If

Set Entry=acl.GetNextEntry(Entry)
Dim doc as NotesDocument
Set doc=session.documentcontext

This was first published in October 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.