Eric Norman created SLING-7937:
----------------------------------

             Summary: A post to update a nested "Date" property for a user or 
group sets the property at the wrong path
                 Key: SLING-7937
                 URL: https://issues.apache.org/jira/browse/SLING-7937
             Project: Sling
          Issue Type: Bug
    Affects Versions: JCR Jackrabbit User Manager 2.2.8
            Reporter: Eric Norman
            Assignee: Eric Norman
             Fix For: JCR Jackrabbit User Manager 2.2.10


When posting an update for a user or group, the handing of nested "Date" 
properties is not correct as it is setting the property at the wrong path.  It 
is ignoring the posted property path and setting the value using the property 
name as the path.  So post an update to "nested/key1" would store the value at 
"key1" instead of "nested/key1".

 

For example:

# 1. create a test user
curl -u admin -F:name=user1 -Fpwd=password -FpwdConfirm=password 
http://localhost:8080/system/userManager/user.create.html

# 2. update a nested date property for the user
curl -u user1 "-Fnested/key1=2018-10-10" "-Fnested/key1@TypeHint=Date" 
http://localhost:8080/system/userManager/user/user1.update.html

# 3. fetching the user resource json should not contain the "key1" value
curl -u user1 http://localhost:8080/system/userManager/user/user1.json

# 4. instead it is expected that the "nested/key1" should be stored under the 
/home/users/*/*[rep:User]/nested folder for the user
curl -u user1 
http://localhost:8080[user_path_from_json_from_#3_here]/nested.json



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to