How can we efficiently get a Jira user's direct groups in a system with nested groups?
I'm able to get them inefficiently by getting all of the user's groups (getGroupsForUser), then checking the direct members of each group (getDirectUsersInGroup), and looping through to see if the specific user (by matching names) is a direct member.
Is there a better way to do this with fewer calls and less looping.