Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2496

getAllUsers method from MgnlUserManager not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Neutral
    • None
    • 3.6.3
    • security
    • windows XP, java 1.5, JBoss 4.0.4

    Description

      The method getAllUsers method from MgnlUserManager in the package info.magnolia.cms.security because of the new structure of the users repository.

      The method could be changed as shown behind in order to work :

      getAllUsers
          /**
           * All users
           */
          public Collection getAllUsers() {
              Collection users = new ArrayList();
              try {
                  Collection nodes = getHierarchyManager().getContent("/admin").getChildren(ItemType.USER);
                  Collection nodes2= getHierarchyManager().getContent("/system").getChildren(ItemType.USER);
                  //we always have a superuser so nodes2 can't be null right? 
                  //and because some collections refuse to add null elements
                  if (nodes !=null)  
                  	nodes2.addAll(nodes);
                  for (Iterator iter = nodes2.iterator(); iter.hasNext();) {
                      users.add(new MgnlUser((Content) iter.next()));
                  }
              }
              catch (Exception e) {
                  log.error("can't find user");
              }
              return users;
          }
      
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                alvaro Alvaro Arce
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD