Not sure if this is easy or not but you could
get the database you want the roles from
create a new acl object from that db
loop through the aclentries looking for the one you want
when you find it get the roles and look for the one you want.
using the ACL and ACLEntry classes