-
Notifications
You must be signed in to change notification settings - Fork 183
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
Increasing permission of a public link of a folder that was initially shared with share+read permissions is allowed - tests need follow-up #3881
Comments
Is this done? Please update this ticket and close the duplicate. |
Done with cs3org/reva#3023 |
There are still some tests that are linked to this issue in expected to fail so re-opening ocis/tests/acceptance/expected-failures-API-on-OCIS-storage.md Lines 550 to 555 in 99b1a40
TODO QA-team
|
The tests are failing currently because OC10 and OCIS gives different ocs status code for this case <?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>error</status>
<statuscode>400</statuscode>
<message>no share permission</message>
</meta>
</ocs> This is the response of the <?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>404</statuscode>
<message>Cannot set the requested share permissions for PARENT</message>
<totalitems/>
<itemsperpage/>
</meta>
<data/>
</ocs>
What should be the expected status code for this? |
All those "create/update a public link share" actions seem to return 404 "not found" in oC10 when the sharee does an action to a received shared resource that is not allowed (tries to create a public link share when they do not have reshare permission, tries to create a public link share with more permissions than they have, tries to update a public link share to give it more permissions...) 403 "forbidden" seems a better code for this (HTTP status and OCS status). What to do next?
IMO clients probably don't care too much. If they let a sharee try to create a public link share with too many privileges, then they are probably doing something similar in response to any of the 4xx response codes - telling the user that it didn't work. |
blocked until #3881 (comment) is answered. |
Can the testsuite accept |
Yes, we can make it do that. @SwikritiT please adjust the related tests so that they check that the staus is 403 or 404 - we don't really care which is returened by an implementation. |
Similar thing with HTTP status as well in |
@micbar @phil-davis |
@SwikritiT ok, we will fix ocis. |
core commit id updated in oCIS PR #4220 - we will update the core commit id in reva tomorrow morning. So the HTTP status can be adjusted in reva-oCIS and the tests should start passing. |
@micbar @phil-davis We can of course change the Status Code to 403 (btw, just to avoid confusiion, this is not the HTTP Status code, but the status code inside the xml payload of the ocs response). But the docs seem to indicate that 404 would be more correct:
403 would actually mean "Public upload disabled", what ever that means in the context of updating a share :-) This is a bit of a mess 🤷♂️ . I'll prepare a change for reva to return 404, but we can still discuss that. |
"I'll prepare a change for reva to return 404, but we can still discuss that." That sounds good. At least it will match what oC10 does. Then it is a separate discussion about if the behavior of both oC10 and oCIS should be changed to return 403. |
The ocs status code returned for permission errors on updates of publiclink permissions is now aligned with the documentation of the OCS share API and the behaviour of ownCloud 10 See also: owncloud/ocis#3881
The ocs status code returned for permission errors on updates of publiclink permissions is now aligned with the documentation of the OCS share API and the behaviour of ownCloud 10 See also: owncloud/ocis#3881
The ocs status code returned for permission errors on updates of publiclink permissions is now aligned with the documentation of the OCS share API and the behaviour of ownCloud 10 See also: owncloud/ocis#3881
The ocs status code returned for permission errors on updates of publiclink permissions is now aligned with the documentation of the OCS share API and the behaviour of ownCloud 10 See also: owncloud/ocis#3881
The ocs status code returned for permission errors on updates of publiclink permissions is now aligned with the documentation of the OCS share API and the behaviour of ownCloud 10 See also: owncloud/ocis#3881
Describe the bug
Increasing permission of a public link of a folder that was initially shared with share+read permissions is allowed
Steps to reproduce
Steps to reproduce the behavior:
einstein
create folderPARENT/CHILD
moss
with permissionread, share
moss
parent
as moss with permissionread
read,update,create,delete
Expected behavior
As in oc10 it shouldn't be possible to increase the permission and the ocs status code should be
404
(403 seems like an appropriate status code but oc10 returns with 404)Actual behavior
Ths permission is update and the ocs status code is 100
Setup
Please describe how you started the server and provide a list of relevant environment variables.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: