You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GET SHARES for a FILE with RESHARES=true does not return Shares owned by other users if the current user does not own any Share on the file #21779
In the web UI, log in as 'admin' and share the folder 'folder' with 'user1'.
Using curl, type: curl -H "OCS-APIREQUEST: true" -u user1:[pass] "[server-base-url]/ocs/v1.php/apps/files_sharing/api/v1/shares?path=folder&reshares=true"
Expected behaviour
Response with code 100 and at least one share, owned by 'admin' and shared with 'user1'
Actual behaviour
Response with code 404 and message "Share doesn't exist"
Server configuration
ownCloud version: (see ownCloud admin page)
ownCloud 8.2.2 (stable)
Updated from an older ownCloud or fresh install:
Fresh
Logs
ownCloud log (data/owncloud.log)
Error OCP\Share Sharing backend for search not found
Error OCP\Share Sharing backend for search not found
Error OCP\Share Sharing backend for search not found
(Seems appear three times)
Extra:
The request works as expected if 'user1' shares 'folder' with 'user2' before, returning all the existing Shares for 'folder'
This is actually expected. Since the share API 'normally' should only returned shares you initiated. We have the shared_with_me for that. which is also not as rock solid at the moment as we would like...
Is there a combo of parameters that returns only the Shares shared with me for a given file? I'm trying to add path and file_target , besides of shared_with_me, but the response includes always all the Shares.
Yeah it is not documented... and also the behaviour is not quite well defined... so short awnser no. no such combination of parameters exist. And certainly not one that works on the old servers as well.
We will need to come up with a v2 of the share API for external share providers. So at that point we can design what we want.
Activity
nickvergessen commentedon Jan 18, 2016
8.2.1 is not the lastest version of that branch. please try 8.2.2
javiergonzper commentedon Jan 19, 2016
@nickvergessen it also fails on 8.2.2
If I have a file shared I can not read the individual share until I share again the file with other user:
curl -X GET -H "OCS-APIREQUEST: true" -u user:password "http://URLSERVER/ocs/v1.php/apps/files_sharing/api/v1/shares?path=/admin.png&reshares=true"
rullzer commentedon Jan 19, 2016
This is actually expected. Since the share API 'normally' should only returned shares you initiated. We have the
shared_with_mefor that. which is also not as rock solid at the moment as we would like...davivel commentedon Jan 19, 2016
Then what's the use case of the
resharesparameter?What do you mean with
?
Is that another parameter? It's not documented in https://doc.owncloud.org/server/8.2/developer_manual/core/ocs-share-api.html
davivel commentedon Jan 19, 2016
Tested, parameter 'shared_with_me' in a GET for shares returns all the Shares target of the current user.
What server version is available this parameter from?
davivel commentedon Jan 19, 2016
Is there a combo of parameters that returns only the Shares shared with me for a given file? I'm trying to add
pathandfile_target, besides ofshared_with_me, but the response includes always all the Shares.rullzer commentedon Jan 19, 2016
Yeah it is not documented... and also the behaviour is not quite well defined... so short awnser no. no such combination of parameters exist. And certainly not one that works on the old servers as well.
We will need to come up with a v2 of the share API for external share providers. So at that point we can design what we want.
rperezb commentedon Jan 19, 2016
cc @carlaschroder new parameter to include on the documentation
carlaschroder commentedon Jan 19, 2016
Thanks @rperezb!
davivel commentedon Jan 22, 2016
Well, I don't know if documenting it is the way to go at this point, since @rullzer says
The key point to me is
Let me reformulate this to the real problem from the client perspective. Just a minute..
davivel commentedon Jan 22, 2016
If you are all OK, we could follow the topic in #21855.
lock commentedon Aug 6, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.