Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-12665

Missing getGroupMembers from Remote API

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      i am missing a getGroupMembers from the remote api
      which means i had to write it myself (see below)
      but this take long time as my user list is growing
      and will reach 2000 or more
      a getGroupMembers will be so good for me
      thanks

      protected String[] getGroupMembers(String groupName) throws RemoteException {
      ConfluenceSoapService soapService = getService();
      String token = getToken();
      if (!soapService.hasGroup(token, groupName))

      { LOGGER.error("group does not exist: " + groupName); return null; }

      ArrayList<String> users = new ArrayList<String>();
      String[] activeUsers = soapService.getActiveUsers(token, true);
      //TODO - this is what taking so long !! 30 sec and growing !!
      for (String user : activeUsers) {
      //get each user group list
      String[] userGroups = soapService.getUserGroups(token, user);
      for (String group : userGroups) {
      if (group.equals(groupName))

      { users.add(user); }

      }
      }
      return users.toArray(new String[users.size()]);
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              faed7e3aa62c Tal Abramson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: