Search DominoPower's 11,429 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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. Roll over 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. Roll over 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.


1  ·  2  ·  Next »
Other articles you might like
Home > Lotus Technologies > Access Control (7 articles)
   Forcing immediate indexes to actually update immediately
   Enabling and disabling the single login setting in Notes 6
   Coding Domino server tasks in C: beyond Windows
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
IBM Lotus to Google Apps Migration Remorse
Webcast Series: Mobile Collaboration with Lotus Software
Domino Login Control for Mobile Apps
Sys Admin Tips March 2010
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login