Getting all users in a role?

Hello,I’m in a quest to dump all note URLs with all users with read access. I’ve managed to generate URLs for each note and all users/groups with read access (or more). I’ve managed to find the members in each group by recursing over names.nsf (code based on the ACLScan.nsf found in the Sandbox). So far it works good enough for my purposes.

But… Some databases/fields in some notes have role entries and thus I’d need to list each user in a role, is there a technique equivalent to that of finding all users in a group for roles?

I’ve only found means to do the reverse, that is, query if a user belongs to a role.

This would mean get all users in names.nsf and get all the roles listed in all of the original notes and then do:

per each user/role combination

does the user belongs to the role?

This seems a bit inefficient and probably won’t work in all cases.

Is that the only available option?

Thanks,

V.