Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-2170

findUserWithAttributesByName of TranslatingApplicationService don't work correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.2, 2.2 Iteration 3
    • 2.1
    • SOAP
      1. standalone version
      2. JDK 5
      3. Linux 2.6.26-2-686

    Description

      I use the SOAP call findPrincipalWithAttributesByName to get an specific user with its attributes. The problem is that i don't receive the attributes.

      I figured already out the cause of this bug.

      The buildApplicationUserWithAttributes method of TranslatingApplicationService wrap the user as UserTemplateWithAttributes to change the name. Here comes the problem.

      public UserTemplateWithAttributes(User user)
      {
         super(user);
      }

      You this that the constructor just delegate the object to its super class. The specific property attributes will not changed. So i fixed it with the following additional lines.

      public UserTemplateWithAttributes(User user)
      {
         super(user);
      
         if (user instanceof UserWithAttributes)
         {
            UserWithAttributes userWithAttributes = (UserWithAttributes) user;
            for (String key : userWithAttributes.getKeys())
            {
               attributes.put(key, userWithAttributes.getValues(key));
            }
         }
      }

      Attachments

        Activity

          People

            onevalainen Olli Nevalainen
            287676b6b997 Andreas Reif
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.5h
                2.5h