Open jasson99 opened 4 years ago
What happens if the 2nd user create request has different parameters (for example different email address or password). Does the user still have the first values, or the second values?
Now, when I create user new-user
again as above, but with different email address and password as:
curl -s -k -X POST https://localhost:9200/ocs/v1.php/cloud/users -H "OCS-APIREQUEST=true" -d username=new-user -d userid=new-user -d email=new-user1234@owncloud.org -d password=123456 -u admin:admin | xmllint --format -
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
</meta>
<data>
<enabled>true</enabled>
<id>new-user</id>
<username>new-user</username>
<displayname/>
<email>new-user1234@owncloud.org</email>
<uidnumber>0</uidnumber>
<gidnumber>0</gidnumber>
</data>
</ocs>
And check the details about user new-user
as :
curl -s -k -u admin:admin -X GET https://localhost:9200/ocs/v1.php/cloud/users/new-user | xmllint --format -
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
</meta>
<data>
<enabled>true</enabled>
<id>new-user</id>
<username>new-user</username>
<displayname/>
<email>new-user1234@owncloud.org</email>
<quota>
<free>2840756224000</free>
<used>5059416668</used>
<total>2845815640668</total>
<relative>0.18</relative>
<definition>default</definition>
</quota>
<uidnumber>0</uidnumber>
<gidnumber>0</gidnumber>
</data>
</ocs>
OK - it updates the email-address. Whereas in oC10 it will fail (there is a different way to update user attributes) "someone" can decide what behavior the OCIS Provisioning API should have.
Description:
When we send a user creation request with already existing usernames then we get the successful user creation response.
How To Reproduce:
Create a user
new-user
Check existing users:
curl -s -k -X POST https://localhost:9200/ocs/v1.php/cloud/users -H "OCS-APIREQUEST=true" -d username=new-user -d userid=new-user -d email=new-user@owncloud.org -d password=1234 -u admin:admin | xmllint --format - <?xml version="1.0" encoding="UTF-8"?>
curl -s -k -u admin:admin -X GET https://localhost:9200/ocs/v1.php/cloud/users | xmllint --format - <?xml version="1.0" encoding="UTF-8"?>