-
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
Disable trashbin and public webdav API by default #36124
Conversation
Heads-up: it will need acceptance tests adjusted, so that the relevant scenarios set |
Codecov Report
@@ Coverage Diff @@
## master #36124 +/- ##
=======================================
Coverage 54% 54%
=======================================
Files 63 63
Lines 7403 7403
Branches 1308 1308
=======================================
Hits 3998 3998
Misses 3019 3019
Partials 386 386
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #36124 +/- ##
=======================================
Coverage 54.01% 54.01%
=======================================
Files 63 63
Lines 7404 7404
Branches 1309 1309
=======================================
Hits 3999 3999
Misses 3019 3019
Partials 386 386
Continue to review full report at Codecov.
|
f5bdbe4
to
4d5113e
Compare
16bed51
to
645afd3
Compare
645afd3
to
81b821e
Compare
@VicDeo or anybody I delete a file using the webUI. I view it in "deleted files" on the webUI. Then I do a "simple" PROPFIND to see what is in the trashbin:
There is a file with file id I turn off the switch:
I do the PROPFIND again and get the same response. Maybe that is OK? Is that PROPFIND part of the trashbin API that should switch off? Then I use the file id to delete the file (whatever its file name might be):
It worked. The file has been deleted.. I go to the webUI and refresh the "deleted files" page and the file is gone. I did not expect that to work. I thought that the I am trying to make test scenarios that confirm that the endpoint(s) are disabled, but, for example, this one still seems to be enabled. ??? |
I first cheated and found out a file id in the trashbin:
Then switch off the tech preview by checking out this branch:
Then try the PROPFIND again:
Looks good. And try directly using a file id that I know is in the trashbin:
Good stuff - it does not delete. |
7ee4234
to
ad6a32b
Compare
ad6a32b
to
497bc56
Compare
I am working on a few more tests - will push another commit in a while. |
5c380ad
to
51a5850
Compare
@@ -269,10 +270,10 @@ Feature: sharing | |||
| uid_file_owner | user0 | | |||
| uid_owner | user0 | | |||
| name | | | |||
And the public should be able to download the range "bytes=1-7" of file "/parent.txt" from inside the last public shared folder using the old public WebDAV API and the content should be "wnCloud" |
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.
I refactored various tests that did "download range" Then
steps, because the "download range" thing was only a way to a short bit of content to check. Better to do an ordinary full download of a file with short content.
(We did this sort of refactoring in other places already)
And uploading a file should not work using the new public WebDAV API | ||
|
||
@public_link_share-feature-required | ||
Scenario: Uploading file to a public read-only share folder does not work |
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.
I split these kind of scenario into 2 scenarios. That allows the first scenario for the old public WebDAV API to run completely with the new public WebDAV API disabled. IMO we do want to know that the old public WebDAV API works properly with the new public WebDAV API disabled.
@@ -323,10 +329,21 @@ public function checkLastPublicSharedFileDownload( | |||
public function checkLastPublicSharedFileWithPasswordDownload( | |||
$publicWebDAVAPIVersion, $password, $expectedContent | |||
) { | |||
if ($publicWebDAVAPIVersion === "new") { |
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.
For various Then
steps that already use the new public WebDAV API to do their checks, I enable it, do the API call(s), then disable it. This allows the scenario(s) which use these steps to run with the API disabled during the scenario setup and When
steps. That helps in testing that the When
steps operate correctly with the tech preview APIs disabled.
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.
I am finished! This looks good to me. I have asked @individual-it to review the acceptance test changes. He should be in an airport somewhere!
@PVince81 please review.
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.
Looks good to me 👍
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.
tests code looks good
Description
A config switch to enable Trashbin and webdav API
dav.enable.tech_preview
addedpipeline.libsonnet
and.drone.yml
adjusted to enable the switch when running litmus testsThen
steps using the new trashbin API are being done to check the results of previousWhen
actions, then enable the switch (if not already enabled), do the check, disable the switch (if we enabled it). That allowswebUITrashbin
tests to run with the switch off for the webUI trashbin actions, and for the subsequent checks to work using the new trashbin API. Thus we know that the old webUI trashbin behavior is working with the switch off.Related Issue
Motivation and Context
We don't want to expose tech preview APIs in 10.3 by default
How Has This Been Tested?
not tested yet
Types of changes
Checklist:
Open tasks: