Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
DEVELOPING AGENTS
How to automatically build groups based on ACL roles
By Tom Lowery

There is a dilemma that faces all Notes a and Domino developers at some point in their careers. Has this ever happened to you? You're building a large workflow application with lots of roles. Those roles can be filled by individuals and public NAB (Name and Address Book) groups alike. Now you want your application to send mail to everyone in a given role. What do you do? Do you now go to your local friendly system administrator and ask her to add still more groups to the public NAB to match your roles? What happens if you have twenty such applications? Your public NAB group list will soon look something like this, or worse:

HR-Directory-[ViewSalary]
HR-Directory-[ChangeSalary]
HR-Directory-[ViewHomeAddress]
AP-Invoices-[ViewVendorAddresses]
AP-Invoices-[PayInvoices]

This clutters the NAB group list and can be a pain to administer.

The problem lies in the way the Domino object model is constructed. There's no easy way for a LotusScript program to determine, for each role, which people and groups are members of that role. Going the other way is simple. The NotesACLEntry.roles property can be used to determine which roles are enabled for an ACL (Access Control List) entry.

A similar situation exists with documents and folders. In R4, there is no easy way to get a list of all the folders a document resides in. That situation is corrected in R5. However, it looks like the ACL role situation will not be changing anytime soon. While anything could happen before R5 goes gold, there appears to be no new functionality to help with role lookups as of Beta 2.

Creating group documents
If you're like me, you may have been tempted to create group documents, locally within the application database. These would match the roles you have defined. This approach is straightforward enough. Simply create a form called Group with two fields, ListName and Members. Both are text fields. Make sure that the Members field has the Allow Multi-values property turned on. You can see an example of this in Figure A.

FIGURE A

Try creating a simple form containing group name and members. Click picture for a larger image.

Then, create a view called Groups with a single sorted column, GroupName, as shown in Figure B.

FIGURE B

Create a simple view with one column called GroupName. Click picture for a larger image.

From there, you can use the following formula to pull the group members and send email to them:

@DbLookup (""; @DbName; "Groups"; roleName; "Members")

This approach keeps the public NAB clean. It also makes your system administrator happy since she doesn't have to keep adding new groups. The drawback, of course, is added work on your part. Every time you add someone to the ACL and give him a role, you must remember to also update the local group document that corresponds to that role.





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.

Learn more about HELP Software products
-- Advertisement --

How good are your Notes Reports?
Integra for Notes provides high value reporting and data analysis from Lotus Notes databases using Microsoft Word, Excel and PDF files.

  • Enhance traditional static reports with Excel data analysis, pivot tables, macros
  • Report from any Lotus Notes databases without changes to database design
  • Runs reports through a Lotus Notes client and a web browser
  • Enables Report scheduling or distribution by e-mail, printing or storing in a Notes database
  • Allows use of LotusScript for advanced data manipulation
Enables self service reporting capabilities to end-users.

Click For More Info.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login