mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 01:10:20 -06:00
[full-ci] Do not share versions (#5531)
* change test expectations * bump reva version * add changelog * fix test * php style fix * bump webCommit. fixt contarct tests * change webBranch * change webBranch * new web commit * fix flaky draw.io file * fix after review --------- Co-authored-by: Viktor Scharf <scharf.vi@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=c7781078121ee07cc19b866713b0047a0e1c0eed
|
||||
WEB_BRANCH=master
|
||||
|
||||
WEB_COMMITID=a36aec7f6af0a0e5d2319f5ab18429e53e9f702a
|
||||
WEB_BRANCH=doNotShareVersionChangeE2eTest
|
||||
|
||||
5
changelog/unreleased/do-not-share-versions.md
Normal file
5
changelog/unreleased/do-not-share-versions.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Change: Do not share versions
|
||||
|
||||
We changed the default behavior of shares: Share receivers have no access to versions. People in spaces with the "Editor" or "Manager" role can still see versions and work with them.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/5531
|
||||
2
go.mod
2
go.mod
@@ -13,7 +13,7 @@ require (
|
||||
github.com/blevesearch/bleve/v2 v2.3.7
|
||||
github.com/coreos/go-oidc/v3 v3.4.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230403080425-f93a726ab656
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
github.com/egirna/icap-client v0.1.1
|
||||
|
||||
6
go.sum
6
go.sum
@@ -627,8 +627,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
|
||||
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
|
||||
github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
|
||||
github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230403080425-f93a726ab656 h1:FAlxhUtG0/57X4i05x3suRd/rtAecM/7ZWeJ9ZtqrIc=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230403080425-f93a726ab656/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae h1:APfYubzIYqCTXtmX6cAm4c8wBYS3R/cZwomX8IlXLaI=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20230404090709-bb973fae26ae/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
@@ -1268,6 +1268,8 @@ github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b h1:Q53idHrTuQD
|
||||
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b/go.mod h1:KirJrATYGbTyUwVR26xIkaipRqRcMRXBf8N5dacvGus=
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZyWckaLfucYG6KYOXLWo4co8pZYNY=
|
||||
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE=
|
||||
github.com/micbar/reva/v2 v2.0.0-20230403215034-66e24325ae82 h1:ivuBEObF9BlpArq363tS2qB9w4YO+b+uO59GueepZhk=
|
||||
github.com/micbar/reva/v2 v2.0.0-20230403215034-66e24325ae82/go.mod h1:FNAYs5H3xs8v0OFmNgZtiMAzIMXd/6TJmO0uZuNn8pQ=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
|
||||
github.com/miekg/dns v1.1.40/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
|
||||
|
||||
@@ -359,10 +359,6 @@ cannot share a folder with create permission
|
||||
- [coreApiShareUpdateToShares/updateShare.feature:241](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L241)
|
||||
- [coreApiShareUpdateToShares/updateShare.feature:242](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L242)
|
||||
|
||||
#### [user can access version metadata of a received share before accepting it](https://github.com/owncloud/ocis/issues/760)
|
||||
|
||||
- [coreApiVersions/fileVersions.feature:487](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiVersions/fileVersions.feature#L487)
|
||||
|
||||
#### [Share lists deleted user as 'user'](https://github.com/owncloud/ocis/issues/903)
|
||||
|
||||
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:676](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L676)
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: REPORT request to Shares space
|
||||
| oc:shareroot | /folderMain |
|
||||
| oc:name | SubFolder1 |
|
||||
| d:getcontenttype | httpd/unix-directory |
|
||||
| oc:permissions | SR |
|
||||
| oc:permissions | S |
|
||||
Examples:
|
||||
| dav_version |
|
||||
| old |
|
||||
@@ -44,7 +44,7 @@ Feature: REPORT request to Shares space
|
||||
| oc:shareroot | /folderMain |
|
||||
| oc:name | frodo.txt |
|
||||
| d:getcontenttype | text/plain |
|
||||
| oc:permissions | SR |
|
||||
| oc:permissions | S |
|
||||
| d:getcontentlength | 34 |
|
||||
Examples:
|
||||
| dav_version |
|
||||
|
||||
@@ -33,7 +33,7 @@ Feature: Report test
|
||||
| oc:shareroot | /folderMain |
|
||||
| oc:name | SubFolder1 |
|
||||
| d:getcontenttype | httpd/unix-directory |
|
||||
| oc:permissions | SR |
|
||||
| oc:permissions | S |
|
||||
| oc:size | 12 |
|
||||
|
||||
|
||||
@@ -52,5 +52,5 @@ Feature: Report test
|
||||
| oc:shareroot | /folderMain |
|
||||
| oc:name | insideTheFolder.txt |
|
||||
| d:getcontenttype | text/plain |
|
||||
| oc:permissions | SRDNVW |
|
||||
| oc:permissions | SD |
|
||||
| d:getcontentlength | 12 |
|
||||
|
||||
@@ -23,7 +23,7 @@ Feature: Download file in project space
|
||||
| role | viewer |
|
||||
|
||||
|
||||
Scenario Outline: An user downloads a file in the project space
|
||||
Scenario Outline: A user downloads a file in the project space
|
||||
When user "<user>" downloads the file "file.txt" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
@@ -36,7 +36,7 @@ Feature: Download file in project space
|
||||
| Bob |
|
||||
|
||||
|
||||
Scenario Outline: An user downloads an old version of the file in the project space
|
||||
Scenario Outline: users with role manager and editor can download an old version of the file in the project space
|
||||
Given user "Alice" has uploaded a file inside space "download file" with content "new content" to "file.txt"
|
||||
And user "Alice" has uploaded a file inside space "download file" with content "newest content" to "file.txt"
|
||||
When user "<user>" downloads version of the file "file.txt" with the index "1" of the space "download file" using the WebDAV API
|
||||
@@ -53,4 +53,10 @@ Feature: Download file in project space
|
||||
| user |
|
||||
| Alice |
|
||||
| Brian |
|
||||
| Bob |
|
||||
|
||||
|
||||
Scenario: A user viewer cannot get the old version of the file in the project space
|
||||
Given user "Alice" has uploaded a file inside space "download file" with content "new content" to "file.txt"
|
||||
When user "Bob" tries to get version of the file "file.txt" with the index "1" of the space "download file" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
@@ -116,50 +116,3 @@ Feature: Restore files, folder
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario: The recipient can restore a file even if there is not enough owner's quota to do so
|
||||
Given user "Admin" has changed the quota of the "Brian Murphy" space to "30"
|
||||
And user "Brian" has uploaded file with content "file is less than 30 bytes" to "/file.txt"
|
||||
And user "Brian" has uploaded file with content "reduceContent" to "/file.txt"
|
||||
And user "Brian" has uploaded file with content "some content" to "newFile.txt"
|
||||
And user "Brian" has shared file "file.txt" with user "Alice"
|
||||
And user "Alice" has accepted share "/file.txt" offered by user "Brian"
|
||||
And using new DAV path
|
||||
When user "Alice" restores version index "1" of file "/Shares/file.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/Shares/file.txt" for user "Alice" should be "file is less than 30 bytes"
|
||||
And for user "Brian" the JSON response should contain space called "Brian Murphy" and match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"quota"
|
||||
],
|
||||
"properties": {
|
||||
"quota": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"state",
|
||||
"total",
|
||||
"remaining",
|
||||
"used"
|
||||
],
|
||||
"properties": {
|
||||
"state" : {
|
||||
"type": "string",
|
||||
"enum": ["exceeded"]
|
||||
},
|
||||
"total" : {
|
||||
"type": "number",
|
||||
"enum": [30]
|
||||
},
|
||||
"used": {
|
||||
"type": "number",
|
||||
"enum": [38]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -41,6 +41,8 @@ Feature:
|
||||
When user "Alice" downloads version of the file "/textfile1.txt" with the index "2" of the space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "old content version 1"
|
||||
When user "Brian" downloads version of the file "/textfile1.txt" with the index "1" of the space "Shares" using the WebDAV API
|
||||
When user "Alice" downloads version of the file "/textfile1.txt" with the index "1" of the space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
And the downloaded content should be "old content version 2"
|
||||
When user "Brian" tries to get version of the file "/textfile1.txt" with the index "1" of the space "Shares" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
@@ -2739,6 +2739,22 @@ class SpacesContext implements Context {
|
||||
WebDavHelper::$SPACE_ID_FROM_OCIS = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" tries to get version of the file "([^"]*)" with the index "([^"]*)" of the space "([^"]*)" using the WebDAV API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $file
|
||||
* @param string $index
|
||||
* @param string $spaceName
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userTriesToDownloadFileVersions(string $user, string $file, string $index, string $spaceName):void {
|
||||
$this->setSpaceIDByName($user, $spaceName);
|
||||
$this->filesVersionsContext->userGetsFileVersions($user, $file);
|
||||
}
|
||||
|
||||
/**
|
||||
* return the etag for an element inside a space
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@api @files_versions-app-required @issue-1262
|
||||
@api
|
||||
|
||||
Feature: dav-versions
|
||||
|
||||
@@ -13,7 +13,7 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "201"
|
||||
And the version folder of file "/davtest.txt" for user "Alice" should contain "0" elements
|
||||
|
||||
@issue-1343 @issue-1321
|
||||
|
||||
Scenario: Upload file and no version is available using various chunking methods (except new chunking)
|
||||
When user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
@@ -29,7 +29,7 @@ Feature: dav-versions
|
||||
And the version folder of file "/davtest.txt" for user "Alice" should contain "1" element
|
||||
And the content length of file "/davtest.txt" with version index "1" for user "Alice" in versions folder should be "8"
|
||||
|
||||
@issue-1343 @issue-1321
|
||||
|
||||
Scenario: Upload a file twice and versions are available using various chunking methods (except new chunking)
|
||||
When user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
||||
And user "Alice" uploads file "filesForUpload/davtest.txt" to filenames based on "/davtest.txt" with all mechanisms except new chunking using the WebDAV API
|
||||
@@ -66,7 +66,7 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/davtest.txt" for user "Alice" should be "Back To The Future."
|
||||
|
||||
@smokeTest @skipOnStorage:ceph @files_primary_s3-issue-161 @issue-1343 @issue-1321
|
||||
@smokeTest @skipOnStorage:ceph @files_primary_s3-issue-161
|
||||
Scenario Outline: Uploading a chunked file does create the correct version that can be restored
|
||||
Given using <dav-path> DAV path
|
||||
And user "Alice" has uploaded file with content "textfile0" to "textfile0.txt"
|
||||
@@ -127,7 +127,7 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/renamedfile.txt" for user "Alice" should be "old content"
|
||||
|
||||
@issue-1238
|
||||
|
||||
Scenario: User can access version number after moving a file
|
||||
Given user "Alice" has created folder "testFolder"
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
||||
@@ -146,7 +146,7 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "0"
|
||||
|
||||
@issue-1234
|
||||
|
||||
Scenario: the number of etag elements in response changes according to version of the file
|
||||
Given user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
||||
@@ -249,14 +249,14 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/davtest.txt" for user "Alice" should be "Old Test Content."
|
||||
|
||||
@issue-5010
|
||||
|
||||
Scenario: Upload the same file twice with the same mtime and a version is available
|
||||
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the version folder of file "/file.txt" for user "Alice" should contain "1" element
|
||||
|
||||
@issue-5010
|
||||
|
||||
Scenario: Upload the same file more than twice with the same mtime and only one version is available
|
||||
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
@@ -264,7 +264,7 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "204"
|
||||
And the version folder of file "/file.txt" for user "Alice" should contain "1" element
|
||||
|
||||
@issue-5010
|
||||
|
||||
Scenario: Upload the same file twice with the same mtime and no version after restoring
|
||||
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
|
||||
@@ -272,21 +272,6 @@ Feature: dav-versions
|
||||
Then the HTTP status code should be "204"
|
||||
And the version folder of file "/file.txt" for user "Alice" should contain "0" element
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: User can access meta folder of a file which is owned by somebody else but shared with that user
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "123" to "/davtest.txt"
|
||||
And user "Alice" has uploaded file with content "456789" to "/davtest.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has created a share with settings
|
||||
| path | /davtest.txt |
|
||||
| shareType | user |
|
||||
| shareWith | Brian |
|
||||
| permissions | read |
|
||||
When user "Brian" accepts share "/davtest.txt" offered by user "Alice" using the sharing API
|
||||
Then the HTTP status code should be "200"
|
||||
And the version folder of fileId "<<FILEID>>" for user "Brian" should contain "1" element
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharer of a file can see the old version information when the sharee changes the content of the file
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
@@ -295,8 +280,9 @@ Feature: dav-versions
|
||||
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
|
||||
When user "Brian" uploads file with content "Second content" to "/Shares/sharefile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
|
||||
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element
|
||||
When user "Brian" gets the number of versions of file "/Shares/sharefile.txt"
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharer of a file can restore the original content of a shared file after the file has been modified by the sharee
|
||||
@@ -324,23 +310,23 @@ Feature: dav-versions
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharee can restore a file inside a shared folder modified by sharee
|
||||
Scenario: sharee cannot see a version of a file inside a shared folder when modified by sharee
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/sharingfolder"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
||||
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
||||
And user "Alice" has uploaded file with content "First content" to "/sharingfolder/sharefile.txt"
|
||||
And user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
||||
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
And user "Brian" gets the number of versions of file "/Shares/sharingfolder/sharefile.txt"
|
||||
Then the HTTP status code should be "403"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "Second content"
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "Second content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharer
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/sharingfolder"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
||||
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
||||
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
|
||||
@@ -349,24 +335,11 @@ Feature: dav-versions
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharee can restore a file inside a shared folder created by sharee and modified by sharer
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/sharingfolder"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
||||
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
||||
And user "Brian" has uploaded file with content "First content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
And user "Alice" has uploaded file with content "Second content" to "/sharingfolder/sharefile.txt"
|
||||
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "First content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharer can restore a file inside a shared folder created by sharee and modified by sharee
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/sharingfolder"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian" with permissions "all"
|
||||
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
||||
And user "Brian" has uploaded file with content "old content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
And user "Brian" has uploaded file with content "new content" to "/Shares/sharingfolder/sharefile.txt"
|
||||
@@ -375,19 +348,6 @@ Feature: dav-versions
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharee can restore a file inside a shared folder created by sharer and modified by sharer
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has created folder "/sharingfolder"
|
||||
And user "Alice" has shared folder "/sharingfolder" with user "Brian"
|
||||
And user "Brian" has accepted share "/sharingfolder" offered by user "Alice"
|
||||
And user "Alice" has uploaded file with content "old content" to "/sharingfolder/sharefile.txt"
|
||||
And user "Alice" has uploaded file with content "new content" to "/sharingfolder/sharefile.txt"
|
||||
When user "Brian" restores version index "1" of file "/Shares/sharingfolder/sharefile.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/sharingfolder/sharefile.txt" for user "Alice" should be "old content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "old content"
|
||||
|
||||
@files_sharing-app-required
|
||||
Scenario: sharer can restore a file inside a group shared folder modified by sharee
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
@@ -408,7 +368,7 @@ Feature: dav-versions
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Brian" should be "First content"
|
||||
And the content of file "/Shares/sharingfolder/sharefile.txt" for user "Carol" should be "First content"
|
||||
|
||||
@files_sharing-app-required @issue-1238
|
||||
@files_sharing-app-required
|
||||
Scenario Outline: Moving a file (with versions) into a shared folder as the sharee and as the sharer
|
||||
Given using <dav_version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
@@ -428,13 +388,12 @@ Feature: dav-versions
|
||||
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data 3"
|
||||
And as "<mover>" file "/testfile.txt" should not exist
|
||||
And the version folder of file "/Shares/testshare/testfile.txt" for user "Alice" should contain "2" elements
|
||||
And the version folder of file "/testshare/testfile.txt" for user "Brian" should contain "2" elements
|
||||
Examples:
|
||||
| dav_version | mover | dst-folder |
|
||||
| old | Brian | /testshare |
|
||||
| new | Brian | /testshare |
|
||||
|
||||
@files_sharing-app-required @issue-1238
|
||||
@files_sharing-app-required
|
||||
Scenario Outline: Moving a file (with versions) out of a shared folder as the sharee and as the sharer
|
||||
Given using <dav_version> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
@@ -480,49 +439,15 @@ Feature: dav-versions
|
||||
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
||||
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
|
||||
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
|
||||
Then the HTTP status code should be "207"
|
||||
And the number of versions should be "3"
|
||||
Then the HTTP status code should be "403"
|
||||
|
||||
@issue-760
|
||||
|
||||
Scenario: Receiver tries get file versions of shared file before receiving it
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "textfile0" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
||||
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
|
||||
Then the HTTP status code should be "404"
|
||||
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"
|
||||
|
||||
|
||||
Scenario: sharer tries get file versions of shared file when the sharee changes the content of the file
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "First content" to "sharefile.txt"
|
||||
And user "Alice" has shared file "sharefile.txt" with user "Brian"
|
||||
And user "Brian" has accepted share "/sharefile.txt" offered by user "Alice"
|
||||
When user "Brian" has uploaded file with content "Second content" to "/Shares/sharefile.txt"
|
||||
Then the HTTP status code should be "204"
|
||||
And the version folder of file "/Shares/sharefile.txt" for user "Brian" should contain "1" element
|
||||
And the version folder of file "/sharefile.txt" for user "Alice" should contain "1" element
|
||||
|
||||
|
||||
Scenario: download old versions of a shared file as share receiver
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file with content "uploaded content" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "version 1" to "textfile0.txt"
|
||||
And user "Alice" has uploaded file with content "version 2" to "textfile0.txt"
|
||||
And user "Alice" has shared file "textfile0.txt" with user "Brian"
|
||||
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
|
||||
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "1"
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
|
||||
And the downloaded content should be "version 1"
|
||||
When user "Brian" downloads the version of file "/Shares/textfile0.txt" with the index "2"
|
||||
Then the HTTP status code should be "200"
|
||||
And the following headers should be set
|
||||
| header | value |
|
||||
| Content-Disposition | attachment; filename*=UTF-8''textfile0.txt; filename="textfile0.txt" |
|
||||
And the downloaded content should be "uploaded content"
|
||||
Then the HTTP status code should be "403"
|
||||
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\Forbidden"
|
||||
|
||||
Reference in New Issue
Block a user