code: private Iterator getGroupsForPrincipal(IAuthorizationPrincipal principal)
              throws GroupsException {
          IGroupMember gm = getGroupMemberForPrincipal(principal);
          return gm.getAncestorGroups().iterator();
      }
docs: Hook into the Groups system by converting the <code>IAuthorizationPrincipal</code> to an
  <code>IGroupMember</code>. Returns ALL the groups the <code>IGroupMember</code> (recursively)
  belongs to.
  
  @param principal - org.apereo.portal.security.IAuthorizationPrincipal
  @return java.util.Iterator over Collection of IEntityGroups