-
Notifications
You must be signed in to change notification settings - Fork 187
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
[full-ci] fix public link update #7862
Conversation
9d9e932
to
ab3310c
Compare
Hi @2403905 I tried your changes locally the failing test needs a little update the test in acceptance/features/coreApiSharePublicLink3/updatePublicLinkShare.feature:104 Scenario Outline: creating a new public link share with password and removing (updating) it to make the resources accessible without password using public API
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
And user "Alice" has created a public link share with settings
| path | randomfile.txt |
| password | %public% |
When user "Alice" updates the last public link share using the sharing API with
#removing password is basically making password empty
| password | %remove% |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the public should be able to download the last publicly shared file using the old public WebDAV API without a password and the content should be "Random data"
And the public should be able to download the last publicly shared file using the new public WebDAV API without a password and the content should be "Random data"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 | Previously the user could remove the password of a link but now they cannot so I think this update is okay based on what is expected of the server. One little change though is that the http status code is different now depending on the ocs version for Scenario Outline: creating a new public link share with password and removing (updating) it
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
And user "Alice" has created a public link share with settings
| path | randomfile.txt |
| password | %public% |
When user "Alice" updates the last public link share using the sharing API with
#removing password is basically making password empty
| password | %remove% |
Then the OCS status code should be "104"
And the HTTP status code should be "<http_status_code>"
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 403 | I think we can remove this scenario as this case is covered here in this scenario below ocis/tests/acceptance/features/coreApiSharePublicLink1/changingPublicLinkShare.feature Line 136 in c8dc52c
Furthermore , can you please rebase this PR with the master to get the changes from this PR #7828 ? You should get the unexpected pass if the changes work as expected. |
The changes fixes the issue #7821 however tests need a little adjustment in the error message and status code here ocis/tests/acceptance/features/coreApiSharePublicLink1/changingPublicLinkShare.feature Lines 163 to 164 in c8dc52c
These two lines need to be updated to And the OCS status code should be "104"
And the OCS status message should be "user is not allowed to delete the password from the public link" |
0782842
to
f5f2354
Compare
API tests should pass now after the removal of ocis/tests/acceptance/expected-failures-API-on-OCIS-storage.md Lines 518 to 520 in 62afc6e
|
And the OCS status code should be "104" | ||
And the OCS status message should be "user is not allowed to delete the password from the public link" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed
And the OCS status code should be "104" | |
And the OCS status message should be "user is not allowed to delete the password from the public link" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These as well
#### [Normal users can update the public link to delete its password if permission is not sent in data](https://github.com/owncloud/ocis/issues/7821) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
@2403905 tests are passing. Please, remove passing tests from the expected failure list.
…icLinkShare.feature Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Kudos, SonarCloud Quality Gate passed! |
* the tests were modified * Update tests/acceptance/features/coreApiSharePublicLink1/changingPublicLinkShare.feature Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com> * the expected failures removed * change log added, reva bumped. --------- Co-authored-by: Roman Perekhod <rperekhod@owncloud.com> Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
* the tests were modified * Update tests/acceptance/features/coreApiSharePublicLink1/changingPublicLinkShare.feature Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com> * the expected failures removed * change log added, reva bumped. --------- Co-authored-by: Roman Perekhod <rperekhod@owncloud.com> Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Description
We fixed enforce password when normal users can update the public link to delete its password if permission is not sent in data
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: