Hi All,
I've noticed that whenever I try to update existing user and it's custom properties all key-value pairs which are not part of the payload are deleted.
Example:
my "testuser"
has 3 custom properties P1, P2 and P3
I construct a payload
<?xml version="1.0" encoding"UTF-8" standalone'"yes"?>
<user>
<username>testuser</username>
<name> Jon Doe </name>
<properties>
<property key="P1" value="some value1"/>
<property key="P3" value="some value2"/>
</properties>
</user>
I use that payload in my PUT request and for userService/users/{username} url
the effect is that my custom property P2 is removed.
a not really desirable behavior.
I assume that behavior is caused by running
user.getProperties().clear();
inside
private void addProperties(UserEntity userEntity) throws ServiceException
of class
UserServicePluginNG
If this is a feature not a bug... I can't really see the logic behind it, so can someone explain?