code: public void assignToGroup(JackrabbitSession session, UserManager userManager,
                                String memberName, Group group)
              throws RepositoryException {
          if (group != null) {
              Authorizable authorizable = userManager.getAuthorizable(memberName);
              if (authorizable != null) {
                  if (!group.isMember(authorizable)) {
                      LOG.info("assign.member: " + authorizable.getID() + " to group: " + group.getID());
                      group.addMember(authorizable);
                  }
              }
          }
      }
docs: Assign an member (user or group) to a group if not always a member.
  
  @param memberName the name of the authorizable (the name only)