-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OCS-API] get sharing recipients #18117
Comments
If we want to add pagination we have to make sure we add proper header support to the OCS response stuff. Else it becomes impossible to unit test. |
Why do we need to itemtype? |
Sharing with remote users (federated sharing) is only allowed on files and folders |
Maybe it would be a good idea to (optinally) accept a list of share id's as well. That way the API can filter out already shared users/groups. |
But we could keep the API simple and just leave it to the clients to filter this properly |
|
Adding a share ID is insufficient. There can be 0 to unlimited shares for the same item. |
let it be a list then |
I can't get this to work properly:
I can only get it to work with two of them. Since the client needs to collect the IDs anyway and most-likely displays the existing shares already, I'd say that's the easiest one to neglect? |
The result now looks as follows: <?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
</meta>
<data>
<exact>
<users>
<element>
<label>test</label>
<value>
<shareType>0</shareType>
<shareWith>test</shareWith>
</value>
</element>
</users>
<groups>
<element>
<label>test</label>
<value>
<shareType>1</shareType>
<shareWith>test</shareWith>
</value>
</element>
</groups>
<remotes/>
</exact>
<users>
<element>
<label>atest</label>
<value>
<shareType>0</shareType>
<shareWith>atest</shareWith>
</value>
</element>
<element>
<label>btest</label>
<value>
<shareType>0</shareType>
<shareWith>btest</shareWith>
</value>
</element>
</users>
<groups>
<element>
<label>test1</label>
<value>
<shareType>1</shareType>
<shareWith>test1</shareWith>
</value>
</element>
</groups>
<remotes/>
</data>
</ocs>
|
Yeah filtering is not going to work in the current situation. Only if the user and group managers search function would allow passing a list of id's to filter out. The reason to have to filtering was to limit the number of requests to the server. But I'm wondering how many shares of an item there are in practise on average. |
According to documentation there is no 4 shareType but 3. |
@rullzer |
@SergioBertolinSG nope. You can search for federated id in your address book. And we don't know what fancy types we might have in the future of course :) |
@DeepDiver1975 @nickvergessen perPage parameter is called limit. |
@SergioBertolinSG should be a bug, please create a new issue |
Reported here: #19007 |
Followup on #16646
Mobile, desktop and web clients need to query the server for sharing recipients (Sharees).
This is the URL to be used:
http://localhost/owncloud/ocs/v1.php/apps/files_sharing/api/v1/sharees
Allowed method: GET
Query strings:
Result:
For each sharee there will be on entry in this form:
Label is the human readable display name.
shareType identifies the type (user, group, email, remote)
shareWith is the identifier to be use on the sharing api call
Pagination shall be supported as per https://developer.github.com/v3/#pagination
The text was updated successfully, but these errors were encountered: