Repository navigation
Add OCS API for sharees list - #18234
Conversation
|
As per specification multiple shareTypes can be passed in $ curl -g -v -u admin "http://localhost:8080/ocs/v1.php/apps/files_sharing/api/v1/sharees?itemType=file&shareType[]=0&shareType[]=1" |
There was a problem hiding this comment.
why do the array_map first and then the array_filter. Just 1 array_filter with callback should do the trick
There was a problem hiding this comment.
right, I just forgot
aef3993 to
9201407
Compare
There was a problem hiding this comment.
36aedee to
9f85d1e
Compare
There was a problem hiding this comment.
Just saying, this is a performance hell, we grab all users and trim the sorted result later.
The problem is our custom sorter does not work on the user/group backend as they can only sort by uid/gid
If user enumeration is disabled, we can change this to a simple check if the group/user exists, but if type hinting is enabled it's 😞
The custom sorter moves results to the beginning of the list, which start with the entered search term. If searchDisplayName() would support wildcards, we could easily circumvent this, by running two requests:
search*and 2.*search*- both with a limit
But for now this seems to be implossible @DeepDiver1975
There was a problem hiding this comment.
I share your concern. This approach can really hurt on huge installations.
But if we want to present merged results like this I do not really see an other option.
There was a problem hiding this comment.
Well the old version (ajax.php) did not grab all users. The only disadvantage was, that the sorting was different (uid, gid, instead of starting with searchterm, otherwise sort by label).
I guess there are people which prefer the "nicer" way of sorting.
But I'd say it's not worth the performance troubles. This will make the drop down unusable on installations with a few hundred users/groups.
There was a problem hiding this comment.
Perf hell: no thanks!
There was a problem hiding this comment.
But lets move this in to allow Clients to implement this feature.
We can work in perf afterwards.
9f85d1e to
91071f1
Compare
|
PostgreSQL |
91071f1 to
3951415
Compare
|
hmpf, forgot to push... Anyway, rebased and pushed now |
To ensure that pagination is working properly we need to make sure the shares are always in the same order. Sorting is first done by label (catches most instances) If there is a user and a group with the same label we sort by shareType If there are multiple users with the same label we sort those by shareWith
0cd07d4 to
199d1dc
Compare
|
A new inspection was created. |
|
Fixed all the points that would result in performance issues or incorrect results |
|
Why the exact part in the response? Clients know what they requested right. So they can pretty easily find the exact match on their own... |
|
exact parts are full matches |
|
looking good 👍 |
|
code looks good 👍 |



@DeepDiver1975 @rullzer
Fix #18117
Todo
Related/Depending