User Group Roles

I have a database where the ACL is defined by groups contained in the Domino Directory. Certain roles are assigned to each group and I set some security with a database based on those roles. I am having trouble ascertaining through Lotus Script the groups that a user is a member of and the roles that each group has assigned.

NotesSession.UserGroupNameList returns group names the user is a member of from the local names directory, not the Domino Directory.

Can anyone suggest a god way of doing this?

Subject: See NotesDatabase methods

See the NotesDatabase methods QueryAccess, QueryAccessRoles. If the database is on the server then these methods will be evaluated relative to the server address book.