documentation icon indicating copy to clipboard operation
documentation copied to clipboard

OCS autocomplete shareTypes not working / cannot filter guests only

Open KuenzelIT opened this issue 5 years ago • 1 comments

Hello everyone,

I'm having a problem with the autocomplete and user search as described here

If I use shareTypes with an s, as described in the docs, then I don't get any results. If I use shareType without an s then I get results filtered by the search but it doesn't seem like it filters by the shareType.

This is the url I expect to work: ocs/v2.php/core/autocomplete/get?format=json&shareType[]=8&search=myname

Do you have an idea why it's not working correctly?

Thanks!

KuenzelIT avatar Jul 21 '20 15:07 KuenzelIT

If I use your query, I get an empty result (with the s): ocs/v2.php/core/autocomplete/get?format=json&shareTypes[]=8&search=myname

However, in the sharing documentation (https://docs.nextcloud.com/server/18/developer_manual/client_apis/OCS/ocs-share-api.html#create-a-new-share):

POST Arguments: shareType - (int) 0 = user; 1 = group; 3 = public link; 4 = email; 6 = federated cloud share; 7 = circle; 10 = Talk conversation

There are no share types 8! If I use 0 for user, I get a list of users:

ocs/v2.php/core/autocomplete/get?format=json&shareTypes[]=0&search=myname

Below the comment, it says that this is valid for guest accounts, why this is 8 I didn't find it. There might be some changes in the documentation after your report here.

Can you still check if there are issues or points that need clarification?

tflidd avatar Apr 22 '22 16:04 tflidd

The descriptive paragraph under the curl example at least now says 8 (rather than confusingly saying 0 at the time this issue was first opened even though the query clearly has an 8 in it).

https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#auto-complete-and-user-search

shareTypes (with the s) is right from the looks of it - just the example value (8) is perhaps not an ideal one...

joshtrichards avatar Aug 19 '23 21:08 joshtrichards