Details
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)); } } }