Wednesday, April 12, 2006

Domino embedded groups solution ...

As we all (Domino related staff) know by now, embedded groups can be a pain to manage and have an overview upon. Not to mention an old and good project I'm working on, which heavily relies on groups for security management. Editor can do whatever they want with their groups, thus resulting a mess when we try to figure out why a user cannot gain access to certain part of the site.

After thinking over for some time, I think I may have a solution for this, thanks to my more or less recent discoveries in terms of Ajax applied to Domino web apps.

In the first step, using an agent build using the Andre Guirard's LS class NotesGroupManager (more here ), I managed to search group embedded hierarchy with an URL command such as:

http://srv/names.nsf/agent?OpenAgent&parm=username

This command would launch the agent, get the query parameter and perform full text searches recursively against the groups, returning HTML as format. Problem is that this agent would eventually throw 'agent did not complete within time limit', so I had to gave up on this approach.

What to do ? building a separate db with a scheduled agent would be to much of work, and as I've already admitted I'm pretty lazy :)

And today it came to me: since I seem to not be able complete the embedded search in one run, I may request the user to participate. This means a simple page with an inputbox and a search button. Scenario is this:
- user enters the search string and hit Search.
- using ajax, I call the agent and full text search the string, returning the group names as JS array
- we do have the DOM and little JS skills, so we build the first level of embedding with radio buttons.
- then, if the user needs to go deep in the hierarchy, he will hit a returning entry and the same process starts again, with the results inserted right below.

Result ? my agent performs only one full text search in one run, so it will not crash. User builds the embedded hierarchy of groups as it see the results.

There might be even loops in this embedded groups of Domino, and for this project there certainly are, but I will rely on the site admin to figure this out :)
Post a Comment

Disclaimer: The information in this weblog is provided "AS IS" with no warranties whatsoever, and confers no rights to any institution/person/organization. These are my personal thoughts and ideas. When I am inspired by others I give credit, I do not assume other's work and efforts. This site is NOT supported, approved, blessed etc. by Lotus Software and/or IBM Corporation.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 License.