While a user tries to get the info of the share using the share id, the ocs status message is Only GET, POST and PUT are allowed if that user is not allowed to access the share.
Steps to reproduce
- Create users:
Alice and Brian and Carol
- User
Alice created and shared file toShareWithBrian.txt with the user "Brian"
- As user
Carol, send a HTTP GET request to the OCS API endpoint /ocs/v2.php/apps/files_sharing/api/v1/shares/<LAST_SHARE_ID>
Expected behavior
The response should be something like that in OC10 in which the ocs status code is 404
Actual behavior (In OCIS)
As user Carol, when HTTP GET request is sent for /ocs/v2.php/apps/files_sharing/api/v1/shares/501b093e-39b9-431c-9234-c343ae215903 where 501b093e-39b9-431c-9234-c343ae215903 is the share id for the share of file toShareWithBrian.txt, I get the following response
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>error</status>
<statuscode>400</statuscode>
<message>Only GET, POST and PUT are allowed</message>
</meta>
</ocs>
In OC10
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>404</statuscode>
<message>Wrong share ID, share doesn't exist</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data/>
</ocs>