Modified to support looking up roles from another table