added request for a list of user details#58
Conversation
|
After merging our PR, I receive this in the tests... |
|
Strange, of course I've been running these tests against nextcloud (v20 and v21)... which version have you been using for your tests? maybe the schema changed? I'll have look at it |
|
I tested it agains 21.0.1 and 21.0.2. |
|
ok, I quickly fired the request against v18 to v21, this is what it should look like: <?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<users>
<admin>
<enabled>1</enabled>
<storageLocation>/var/www/html/data/admin</storageLocation>
<id>admin</id>
<lastLogin>1621586168000</lastLogin>
<backend>Database</backend>
<subadmin/>
<quota>
<free>45053579264</free>
<used>16913831</used>
<total>45070493095</total>
<relative>0.04</relative>
<quota>-3</quota>
</quota>
<email/>
<displayname>admin</displayname>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups>
<element>admin</element>
</groups>
<language></language>
<locale></locale>
<backendCapabilities>
<setDisplayName>1</setDisplayName>
<setPassword>1</setPassword>
</backendCapabilities>
</admin>
</users>
</data>
</ocs>it seems like there's something wrong with xml schema in case nextcloud uses ldap as the backend provider, at least in your example there are no user id tags... I'll try to quickly check against a ldap instance |
|
ok, so this the result of a test against a ldap instance (v20.0.8): <?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<users>
<element>
<enabled>1</enabled>
<storageLocation>*****</storageLocation>
<id>*****</id>
<lastLogin>0</lastLogin>
<backend>LDAP</backend>
<subadmin/>
<quota>
<quota>*****</quota>
<used>0</used>
</quota>
<email>*****</email>
<displayname>*****</displayname>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups>
<element>*****</element>
</groups>
<language>de_DE</language>
<locale></locale>
<backendCapabilities>
<setDisplayName></setDisplayName>
<setPassword></setPassword>
</backendCapabilities>
</element>
<admin>
<enabled>1</enabled>
<storageLocation>*****</storageLocation>
<id>admin</id>
<lastLogin>*****</lastLogin>
<backend>Database</backend>
<subadmin/>
<quota>
<free>*****</free>
<used>*****</used>
<total>*****</total>
<relative>0.04</relative>
<quota>-3</quota>
</quota>
<email/>
<displayname>admin</displayname>
<phone></phone>
<address></address>
<website></website>
<twitter></twitter>
<groups>
<element>admin</element>
</groups>
<language>de_DE</language>
<locale></locale>
<backendCapabilities>
<setDisplayName>1</setDisplayName>
<setPassword>1</setPassword>
</backendCapabilities>
</admin>
</users>
</data>
</ocs>so it seems like LDAP users are encapsulated within |
|
I also ran another test against v21.0.1 with ldap as the user backend provider without any issues. |
|
Hi! I wanted to ask if you're going to take my latest enhancements into the next official release? |
|
I will try again with a new Nextcloud instance in the next days |
|
It's a nextcloud bug causing invalid XML response, when you have users with non-xml allowed characters in the name. |
|
A possible work arround is to:
This will work, since the "single" response for the user details has a different xml structure, but the drawback is that we need n+1 requests to get all users @kriszman Would you be willing to change the handling as mentioned above? |
|
The current nextcloud server api will not be fixed, due to missing versioning. |
|
Ok, these are rather bad news, because in fact I wanted avoid your provided workaround in the first place as I'm already using it and it simply requires too many unnecessary requests, however thx a lot for your investigations! |
|
Nope, unfortunall this does not work, since the xml document sent by the server is already corrupt. |
No description provided.