Lotus provides the method QueryAccessRoles of the NotesDatabase class to get the roles of a user and there are no methods to get users belonging to a role, but you can get them by combining IsRoleEnabled of the NotesACLEntry class with the function getUsersByGroup that I wrote in a previous article.
There is not a method in lotusccript to get the list of all users belonging to a group, and to complicate matters, groups can contain other groups as members.
To solve this problem I wrote getUsersByGroup function that returns the list of users belonging to a group, provided that:
- the public names.nsf is accessible
- users have a document “Person” in the public address book
- groups are defined in the names
- the maximum number of nested groups is 100, but you can change this setting changing the variable maxNestedGroup