hopefully a nice easy one…? I want a drop down of all users in a given database. So far I’ve accessed the ACL and picked up whether the entry is a person or not. But when you get to a Group, how can you access the Group’s members? Is there a “standard” approach?
Thanks
Subject: List of users in database
The only way I know of is (assuming you’re using LS) when you hit a group name, do a lookup to the NAB and loop through the entries in the Members field of the group to get the names. Not difficult, but tedious.
Subject: RE: List of users in database
…and requires recursion if using nested groups. And your whole premise relies on -Default- being set to No Access.
Your definition of “database user” is someone who is granted access to the db, not necessarily someone who ever opens it, correct? If you want instead a list of all users who’ve opened the db, you could calculate that going forward by updating a database profile document in the db’s postopen event.
Subject: RE: List of users in database
As Esther says, not difficult, but tedious. And yes, nested groups are a feature so recursion rears its head.
However, I do like the idea of using the postopen event subject to the caveat you give that my resultant list will only show users who have opened the database. I guess I’ll just list that as a “feature”!
Many thanks for your thoughts.
Subject: RE: List of users in database
what is the end goal? I think it is far to say there are many ways to track an user, but if the orignal postee whats all the users based on who has access then groups seems to be the better approach.
NOTE: database user info (if enable) will show who uses the database, but that may not a good indicator either.
Subject: RE: List of users in database
I’ve just one thing to add:The database’s PostOpen event isn’t 100% accurate- there are means to bypass this event from occuring;
Try this:
Open the workspace and single-click a databasicon (so it is marked). In the menu, choose “View/Go To…” and select any view that appears in the dialogbox and hit OK. This will not cause the PostOpen event of the database to fire…
But still, the approach to use the PostOpen event to update a database profile document is most likely best way to go…
Subject: List of users in database
You will not get a list of users in the ACL. You would need to take the group name and go back to the domino directory to get the “members” of the group.
As to if there is a standard approach? What you are asking is what domino does on the fly when it enforces the ACL. For you to get the list of users you have to not be reliant on purely the ACL but also the domino directory since that is where the group members are assigned.