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

Creating an agent to automatically build groups
You can eliminate the drawback of hand-updating the local group document if you create an agent to automatically build the groups. This agent can examine the ACL and build groups that match.

The script for the agent is available at http://www.component-net.com/dp-extras/acl.html. Let's go over each aspect of the program so you can get a better feel for how it operates.

The first step is to delete any existing group documents. We don't want duplicates. After the old documents are deleted, we proceed to build new ones. The script accesses the ACL through the NotesDatabase.ACL property. This property contains a list of every role defined in the ACL. The Forall loop examines each role in the list.

Each iteration of the loop creates a new group document and fills in the Form and ListName fields. It also initializes the Members field to an empty state and sets the field IsNames property to True. Setting IsNames isn't crucial to the operation of the script, but it's good practice to flag the field as one containing names, just in case some other program comes along later looking for Names fields.

The next section is the meat of the script. It steps down through each ACL entry and checks whether the current role is enabled for that entry. If so, it adds the name to the Members list. After every ACL entry is checked, the script saves the group document for that role and moves on to the next role.

This script is perhaps most useful as a scheduled agent. The Make Role Groups agent shown in Figure C is defined to run at 2 AM each day. Be sure to set the correct server where you want the agent to run, or set the "Choose when agent is enabled" property. Scheduled agents will not run if the server is set to Local.

FIGURE C

Be sure to pay special attention to when the agent is to run and from what server. Click picture for a larger image.

And there you go. That's about all that's necessary to make it work.

Using automatic group generation from roles has saved me a lot of grief with large, complex applications. I hope you will find it useful too.

Tom Lowery, CLP, is an Applications Analyst for The J. M. Smucker Company. He holds an M.S. in Computer Science from Kent State University and is an R4 Principal Application Developer and R4 Principal System Administrator. His favorite hobby is playing with his one-year-old son Duncan, whose research interests include snow, lint, and anything that will fit in his mouth. Tom can be reached at tom@lowery.net.




[ Prev ]

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 --

DEPARTMENT CALENDAR - MANAGE AND SHARE A COMMON CALENDAR WITH YOUR TEAMS
Are you responsible for improving your organization's Group Calendaring tool? Have you been tasked to find a true group calendar tool with Itinerary, Time-Off, Sign In/Out and Bulletins/Events module that seamlessly integrates with Domino calendaring?

If so, Logic Springs Technologies will make answering these questions a whole lot easier!

Learn how by visiting us at www.departmentcalendar.com

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