shares jail spaces related tests separated to apiSpacesShares suite

This commit is contained in:
Prarup Gurung
2022-09-26 10:08:41 +05:45
parent f39463b2fe
commit 46cd7b45f4
16 changed files with 27 additions and 6 deletions

View File

@@ -1,39 +0,0 @@
@api @skipOnOcV10
Feature:
Background:
Given using spaces DAV path
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
@issue-4421
Scenario: Move files between shares by different users
Given user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Brian" has created folder "/PARENT"
And user "Alice" has moved file "textfile0.txt" to "PARENT/from_alice.txt" in space "Personal"
And user "Alice" has shared folder "/PARENT" with user "Carol"
And user "Brian" has shared folder "/PARENT" with user "Carol"
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Brian"
When user "Carol" moves file "PARENT/from_alice.txt" to "PARENT (1)/from_alice.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Carol" folder "PARENT" of the space "Shares Jail" should not contain these entries:
| from_alice.txt |
And for user "Carol" folder "PARENT (1)" of the space "Shares Jail" should contain these entries:
| from_alice.txt |
Scenario: overwrite a received file share
Given user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
And user "Alice" has shared file "/textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "this is a new content" to "textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares Jail" should contain these entries:
| textfile1.txt |
And for user "Brian" the content of the file "/textfile1.txt" of the space "Shares Jail" should be "this is a new content"
And for user "Alice" the content of the file "/textfile1.txt" of the space "Personal" should be "this is a new content"

View File

@@ -1,27 +0,0 @@
@api @skipOnOcV10
Feature: checksums
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And using spaces DAV path
And user "Brian" has been created with default attributes and without skeleton files
@files_sharing-app-required @issue-ocis-reva-196
Scenario: Sharing a file with checksum should return the checksum in the propfind using new DAV path
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian"
And user "Brian" has accepted share "/myChecksumFile.txt" offered by user "Alice"
When user "Brian" requests the checksum of file "/myChecksumFile.txt" in space "Shares Jail" via propfind using the WebDAV API
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:3ee962b839762adb0ad8ba6023a4690be478de6f MD5:d70b40f177b14b470d1756a3c12b963a ADLER32:8ae90960"
@files_sharing-app-required @issue-ocis-reva-196
Scenario: Modifying a shared file should return correct checksum in the propfind using new DAV path
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian"
And user "Brian" has accepted share "/myChecksumFile.txt" offered by user "Alice"
When user "Brian" uploads file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/myChecksumFile.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as user "Alice" the webdav checksum of "/myChecksumFile.txt" via propfind should match "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399 MD5:56e57920c3c8c727bfe7a5288cdf61c4 ADLER32:1048035a"

View File

@@ -1,694 +0,0 @@
@api @skipOnOcV10
Feature: copy file
As a user
I want to be able to copy files
So that I can manage my files
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
Scenario Outline: Copying a file within a same space project with role manager and editor
Given the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a folder "/newfolder" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "/insideSpace.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "<role>"
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Project" should contain these entries:
| /newfolder/insideSpace.txt |
And for user "Alice" the content of the file "/newfolder/insideSpace.txt" of the space "Project" should be "some content"
Examples:
| role |
| manager |
| editor |
Scenario: Copying a file within a same space project with role viewer
Given the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a folder "/newfolder" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "viewer"
When user "Brian" copies file "/insideSpace.txt" to "/newfolder/insideSpace.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Brian" the space "Project" should not contain these entries:
| /newfolder/insideSpace.txt |
Scenario Outline: User copies a file from a space project with a different role to a space project with the manager role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "/project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
When user "Alice" copies file "/project1.txt" from space "Project1" to "/project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project2" should contain these entries:
| /project1.txt |
And for user "Alice" the content of the file "/project1.txt" of the space "Project2" should be "Project1 content"
Examples:
| from_role | to_role |
| manager | manager |
| manager | editor |
| editor | manager |
| editor | editor |
Scenario Outline: User copies a file from a space project with a different role to a space project with a viewer role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "/project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "viewer"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<role>"
When user "Alice" copies file "/project1.txt" from space "Project1" to "/project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project2" should not contain these entries:
| project1.txt |
Examples:
| role |
| manager |
| editor |
Scenario Outline: User copies a file from space project with different role to space personal
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
When user "Alice" copies file "/project.txt" from space "Project" to "/project.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| project.txt |
And for user "Alice" the content of the file "/project.txt" of the space "Personal" should be "Project content"
Examples:
| role |
| manager |
| editor |
| viewer |
Scenario Outline: User copies a file from space project with different role to space shares jail with editor role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
| /project.txt |
And for user "Alice" the content of the file "/testshare/project.txt" of the space "Shares Jail" should be "Project content"
Examples:
| role |
| manager |
| editor |
| viewer |
Scenario Outline: User copies a file from space project with different role to shares jail with viewer role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "/project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare/project.txt |
Examples:
| role |
| manager |
| editor |
| viewer |
Scenario Outline: User copies a file from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| /personal.txt |
And for user "Alice" the content of the file "/personal.txt" of the space "Project" should be "personal space content"
Examples:
| role |
| manager |
| editor |
Scenario: User copies a file from space personal to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| /personal.txt |
Scenario: User copies a file from space personal to space shares jail with role editor
Given user "Brian" has created folder "/testshare"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
And user "Alice" has uploaded file with content "personal content" to "personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
| personal.txt |
And for user "Alice" the content of the file "/testshare/personal.txt" of the space "Shares Jail" should be "personal content"
Scenario: User copies a file from space personal to space shares jail with role viewer
Given user "Brian" has created folder "/testshare"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
And user "Alice" has uploaded file with content "personal content" to "/personal.txt"
When user "Alice" copies file "/personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare/personal.txt |
Scenario Outline: User copies a file from space shares jail with different role to space personal
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/testshare/testshare.txt" from space "Shares Jail" to "/testshare.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| /testshare.txt |
And for user "Alice" the content of the file "/testshare.txt" of the space "Personal" should be "testshare content"
Examples:
| permissions |
| 31 |
| 17 |
Scenario Outline: User copies a file from space shares jail with different role to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/testshare/testshare.txt" from space "Shares Jail" to "/testshare.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| /testshare.txt |
And for user "Alice" the content of the file "/testshare.txt" of the space "Project" should be "testshare content"
Examples:
| role | permissions |
| manager | 31 |
| manager | 17 |
| editor | 31 |
| editor | 17 |
Scenario Outline: User copies a file from space shares jail with different role to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/testshare/testshare.txt" from space "Shares Jail" to "/testshare.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| /testshare.txt |
Examples:
| permissions |
| 31 |
| 17 |
Scenario Outline: User copies a file from space shares jail with different role to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<permissions>"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" copies file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare2" of the space "Shares Jail" should contain these files:
| /testshare1.txt |
And for user "Brian" the space "Personal" should contain these entries:
| /testshare2/testshare1.txt |
And for user "Alice" the content of the file "/testshare2/testshare1.txt" of the space "Shares Jail" should be "testshare1 content"
And for user "Brian" the content of the file "/testshare1/testshare1.txt" of the space "Personal" should be "testshare1 content"
Examples:
| permissions |
| 31 |
| 17 |
Scenario Outline: User copies a file from space shares jail with different role to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<permissions>"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" copies file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
Examples:
| permissions |
| 31 |
| 17 |
Scenario Outline: Copying a folder within the same space project with different role
Given the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "Project" with the default quota using the GraphApi
And user "Alice" has created a folder "/folder1" in space "Project"
And user "Alice" has created a folder "/folder2" in space "Project"
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "/folder2/demo.txt"
And user "Alice" has shared a space "Project" to user "Brian" with role "<role>"
When user "Brian" copies folder "/folder2" to "/folder1/folder2" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Brian" the space "Project" <shouldOrNot> contain these entries:
| folder1/folder2/demo.txt |
Examples:
| role | shouldOrNot | status-code |
| manager | should | 201 |
| editor | should | 201 |
| viewer | should not | 403 |
Scenario Outline: User copies a folder from a space project with different role to a space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has created a folder "/folder1" in space "Project1"
And user "Brian" has uploaded a file inside space "Project1" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
When user "Alice" copies folder "/folder1" from space "Project1" to "/folder1" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" the space "Project2" <shouldOrNot> contain these entries:
| /folder1/demo.txt |
Examples:
| from_role | to_role | status-code | shouldOrNot |
| manager | manager | 201 | should |
| manager | editor | 201 | should |
| editor | manager | 201 | should |
| editor | editor | 201 | should |
| manager | viewer | 403 | should not |
| editor | viewer | 403 | should not |
| viewer | viewer | 403 | should not |
Scenario Outline: User copies a folder from space project with different role to space personal
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "/folder1" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
When user "Alice" copies file "/folder1" from space "Project" to "/folder1" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| /folder1/demo.txt |
Examples:
| role |
| manager |
| editor |
| viewer |
Scenario Outline: User copies a folder from space project with different role to space shares jail with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has created a folder "/folder1" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/folder1" from space "Project" to "/testshare/folder1" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" folder "testshare" of the space "Shares Jail" <shouldOrNot> contain these files:
| /folder1/demo.txt |
Examples:
| role | shouldOrNot | permissions | status-code |
| manager | should | 31 | 201 |
| editor | should | 31 | 201 |
| viewer | should | 31 | 201 |
| manager | should not | 17 | 403 |
| editor | should not | 17 | 403 |
| viewer | should not | 17 | 403 |
Scenario Outline: User copies a folder from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Alice" has created folder "/folder1"
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
When user "Alice" copies folder "/folder1" from space "Personal" to "/folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" the space "Project" <shouldOrNot> contain these entries:
| /folder1/demo.txt |
Examples:
| role | shouldOrNot | status-code |
| manager | should | 201 |
| editor | should | 201 |
| viewer | should not | 403 |
Scenario Outline: User copies a folder from space personal to space shares jail with different permmissions
Given user "Brian" has created folder "/testshare"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
And user "Alice" has created folder "folder1"
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
When user "Alice" copies folder "/folder1" from space "Personal" to "/testshare/folder1" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "<status-code>"
And for user "Alice" folder "testshare" of the space "Shares Jail" <shouldOrNot> contain these files:
| folder1/demo.txt |
Examples:
| permissions | shouldOrNot | status-code |
| 31 | should | 201 |
| 17 | should not | 403 |
Scenario Outline: User copies a folder from space shares jail with different role to space personal
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/testshare/testshare.txt" from space "Shares Jail" to "/testshare.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Personal" should contain these entries:
| /testshare.txt |
And for user "Alice" the content of the file "/testshare.txt" of the space "Personal" should be "testshare content"
Examples:
| permissions |
| 31 |
| 17 |
Scenario Outline: User copies a folder from space shares jail with different role to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has created folder "/testshare"
And user "Brian" has created folder "/testshare/folder1"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/testshare/folder1" from space "Shares Jail" to "folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| /folder1/testshare.txt |
Examples:
| role | permissions |
| manager | 31 |
| manager | 17 |
| editor | 31 |
| editor | 17 |
Scenario Outline: User copies a folder from space shares jail with different role to space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
And user "Brian" has created folder "/testshare"
And user "Brian" has created folder "/testshare/folder1"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies folder "/testshare/folder1" from space "Shares Jail" to "folder1" inside space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| /folder1/testshare.txt |
Examples:
| permissions |
| 31 |
| 17 |
Scenario: Copying a file to a folder with no permissions
Given using spaces DAV path
And user "Brian" has created folder "/testshare"
And user "Brian" has created a share with settings
| path | testshare |
| shareType | user |
| permissions | read |
| shareWith | Alice |
And user "Alice" has accepted share "/testshare" offered by user "Brian"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
When user "Alice" copies file "/textfile0.txt" from space "Personal" to "/testshare/textfile0.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And user "Alice" should not be able to download file "/testshare/textfile0.txt" from space "Shares Jail"
Scenario: Copying a file to overwrite a file into a folder with no permissions
Given using spaces DAV path
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "ownCloud test text file 1" to "/testshare/overwritethis.txt"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Brian" has created a share with settings
| path | testshare |
| shareType | user |
| permissions | read |
| shareWith | Alice |
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "/textfile0.txt" from space "Personal" to "/testshare/overwritethis.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the content of the file "/testshare/overwritethis.txt" of the space "Shares Jail" should be "ownCloud test text file 1"
Scenario: copy a file over the top of an existing folder received as a user share
Given using spaces DAV path
And user "Alice" has uploaded file with content "ownCloud test text file 1" to "/textfile1.txt"
And user "Brian" has created folder "/BRIAN-Folder"
And user "Brian" has created folder "BRIAN-Folder/sample-folder"
And user "Brian" has shared folder "BRIAN-Folder" with user "Alice"
And user "Alice" has accepted share "/BRIAN-Folder" offered by user "Brian"
When user "Alice" copies file "/textfile1.txt" from space "Personal" to "/BRIAN-Folder" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "/BRIAN-Folder" of the space "Shares Jail" should be "ownCloud test text file 1"
And as "Alice" file "/textfile1.txt" should exist
And user "Alice" should not have any received shares
Scenario: copy a folder over the top of an existing file received as a user share
Given using spaces DAV path
And user "Alice" has created folder "/FOLDER"
And user "Alice" has created folder "/FOLDER/sample-folder"
And user "Brian" has uploaded file with content "file to share" to "/sharedfile1.txt"
And user "Brian" has shared file "/sharedfile1.txt" with user "Alice"
And user "Alice" has accepted share "/sharedfile1.txt" offered by user "Brian"
When user "Alice" copies folder "/FOLDER" from space "Personal" to "/sharedfile1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/FOLDER/sample-folder" should exist
And for user "Alice" folder "/sharedfile1.txt" of the space "Shares Jail" should contain these files:
| /sample-folder |
And user "Alice" should not have any received shares
Scenario: copy a folder into another folder at different level which is received as a user share
Given using spaces DAV path
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder/third-level-folder"
And user "Brian" has shared folder "/BRIAN-FOLDER" with user "Alice"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b/sample-folder-c"
When user "Alice" copies folder "/Sample-Folder-A/sample-folder-b" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-folder" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these entries:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And for user "Brian" folder "BRIAN-FOLDER" of the space "Personal" should contain these files:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a file into a folder at different level received as a user share
Given using spaces DAV path
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder/third-level-folder"
And user "Brian" has shared folder "/BRIAN-FOLDER" with user "Alice"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-folder" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should not contain these files:
| /second-level-folder/third-level-folder |
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these files:
| /second-level-folder |
And for user "Alice" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Shares Jail" should be "sample file-c"
And for user "Brian" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Personal" should be "sample file-c"
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a file into a file at different level received as a user share
Given using spaces DAV path
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has uploaded file with content "file at second level" to "/BRIAN-FOLDER/second-level-file.txt"
And user "Brian" has shared folder "/BRIAN-FOLDER" with user "Alice"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-file.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these files:
| /second-level-file.txt |
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should not contain these files:
| /textfile-c.txt |
And for user "Alice" the content of the file "/BRIAN-FOLDER/second-level-file.txt" of the space "Shares Jail" should be "sample file-c"
And for user "Brian" the content of the file "/BRIAN-FOLDER/second-level-file.txt" of the space "Personal" should be "sample file-c"
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a folder into a file at different level received as a user share
Given using spaces DAV path
And user "Alice" has created folder "/FOLDER"
And user "Alice" has created folder "/FOLDER/second-level-folder"
And user "Alice" has created folder "/FOLDER/second-level-folder/third-level-folder"
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has uploaded file with content "file at third level" to "BRIAN-FOLDER/second-level-folder/third-level-file.txt"
And user "Brian" has shared folder "/BRIAN-FOLDER" with user "Alice"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
When user "Alice" copies folder "/FOLDER/second-level-folder" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-file.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these entries:
| /second-level-folder/third-level-file.txt/third-level-folder |
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should not contain these entries:
| /second-level-folder/second-level-folder/ |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a folder into another folder at different level which is received as a group share
Given using spaces DAV path
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder/third-level-folder"
And user "Brian" has shared folder "/BRIAN-FOLDER" with group "grp1"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b/sample-folder-c"
When user "Alice" copies folder "/Sample-Folder-A/sample-folder-b" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-folder" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these files:
| /second-level-folder/third-level-folder/sample-folder-c/ |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a file into a folder at different level received as a group share
Given using spaces DAV path
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder/third-level-folder"
And user "Brian" has shared folder "/BRIAN-FOLDER" with group "grp1"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-folder" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should not contain these entries:
| /second-level-folder/third-level-folder |
And for user "Alice" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Shares Jail" should be "sample file-c"
And for user "Brian" the content of the file "/BRIAN-FOLDER/second-level-folder" of the space "Personal" should be "sample file-c"
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: overwrite a file received as a group share with a file from different level
Given using spaces DAV path
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has uploaded file with content "file at second level" to "/BRIAN-FOLDER/second-level-file.txt"
And user "Brian" has shared folder "/BRIAN-FOLDER" with group "grp1"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/Sample-Folder-A"
And user "Alice" has created folder "/Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "/Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" from space "Personal" to "/BRIAN-FOLDER/second-level-file.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And for user "Alice" folder "/BRIAN-FOLDER" of the space "Shares Jail" should not contain these files:
| /textfile-c.txt |
And as "Alice" file "/Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And for user "Alice" the content of the file "/BRIAN-FOLDER/second-level-file.txt" of the space "Shares Jail" should be "sample file-c"
And for user "Brian" the content of the file "/BRIAN-FOLDER/second-level-file.txt" of the space "Personal" should be "sample file-c"
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |
Scenario: copy a folder into a file at different level received as a group share
Given using spaces DAV path
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "/BRIAN-FOLDER"
And user "Brian" has created folder "/BRIAN-FOLDER/second-level-folder"
And user "Brian" has uploaded file with content "file at third level" to "/BRIAN-FOLDER/second-level-folder/third-level-file.txt"
And user "Brian" has shared folder "/BRIAN-FOLDER" with group "grp1"
And user "Alice" has accepted share "/BRIAN-FOLDER" offered by user "Brian"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has created folder "/FOLDER/second-level-folder"
And user "Alice" has created folder "/FOLDER/second-level-folder/third-level-folder"
When user "Alice" copies folder "/FOLDER/second-level-folder" from space "Personal" to "/BRIAN-FOLDER/second-level-folder/third-level-file.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should contain these files:
| /second-level-folder/third-level-file.txt/ |
| /second-level-folder/third-level-file.txt/third-level-folder/ |
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should exist
And for user "Alice" folder "BRIAN-FOLDER" of the space "Shares Jail" should not contain these files:
| /second-level-folder/second-level-folder |
And the response when user "Alice" gets the info of the last share should include
| file_target | /Shares/BRIAN-FOLDER |

View File

@@ -1,55 +0,0 @@
@api @skipOnOcV10
Feature: create file or folder named similar to Shares folder
As a user
I want to be able to create files and folders when the Shares folder exists
So that I can organise the files in my file system
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian" with permissions "read,update"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
Scenario Outline: create a folder with a name similar to Shares
Given using spaces DAV path
When user "Brian" creates folder "<folder_name>" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Personal" should contain these entries:
| <folder_name>/ |
Examples:
| folder_name |
| Share |
| shares |
| Share1 |
Scenario Outline: create a file with a name similar to Shares
Given using spaces DAV path
When user "Brian" uploads file with content "some text" to "<file_name>" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "<file_name>" for user "Brian" should be "some text"
And for user "Brian" the space "Personal" should contain these entries:
| <file_name> |
And for user "Brian" the space "Shares Jail" should contain these entries:
| FOLDER/ |
Examples:
| file_name |
| Share |
| shares |
| Share1 |
Scenario: try to create a folder named Shares
Given using spaces DAV path
When user "Brian" creates folder "/Shares" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Shares Jail" should contain these entries:
| FOLDER/ |
Scenario: try to create a file named Shares
Given using spaces DAV path
When user "Brian" uploads file with content "some text" to "/Shares" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Shares Jail" should contain these entries:
| FOLDER/ |

View File

@@ -1,425 +0,0 @@
@api
Feature: check etag propagation after different file alterations
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
And user "Alice" has created folder "/upload"
Scenario: copying a file inside a folder as a share receiver changes its etag for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/file.txt" inside space "Shares Jail"
And user "Brian" has stored etag of element "upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail"
When user "Brian" copies file "/upload/file.txt" to "/upload/renamed.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/renamed.txt | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/renamed.txt | Shares Jail |
And these etags should not have changed
| user | path | space |
| Alice | /upload/file.txt | Personal |
| Brian | /upload/file.txt | Shares Jail |
Scenario: copying a file inside a folder as a sharer changes its etag for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/file.txt" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail"
When user "Alice" copies file "/upload/file.txt" to "/upload/renamed.txt" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/renamed.txt | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/renamed.txt | Shares Jail |
And these etags should not have changed
| user | path | space |
| Alice | /upload/file.txt | Personal |
| Brian | /upload/file.txt | Shares Jail |
Scenario: as share receiver renaming a file inside a folder changes its etag for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail"
When user "Brian" moves file "/upload/file.txt" to "/upload/renamed.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
And these etags should not have changed
| user | path | space |
| Alice | /upload/renamed.txt | Personal |
| Brian | /upload/renamed.txt | Shares Jail |
Scenario: as sharer renaming a file inside a folder changes its etag for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail"
When user "Alice" moves file "/upload/file.txt" to "/upload/renamed.txt" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
And these etags should not have changed
| user | path | space |
| Alice | /upload/renamed.txt | Personal |
| Brian | /upload/renamed.txt | Shares Jail |
Scenario: as sharer moving a file from one folder to an other changes the etags of both folders for all collaborators
Given user "Alice" has created folder "/dst"
And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has shared folder "/dst" with user "Brian"
And user "Brian" has accepted share "/dst" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/dst" inside space "Personal"
And user "Alice" has stored etag of element "/upload/file.txt" on path "/dst/file.txt" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/dst" inside space "Shares Jail"
When user "Alice" moves file "/upload/file.txt" to "/dst/file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /dst | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /dst | Shares Jail |
Scenario: as share receiver moving a file from one folder to an other changes the etags of both folders for all collaborators
Given user "Alice" has created folder "/dst"
And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has shared folder "/dst" with user "Brian"
And user "Brian" has accepted share "/dst" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/dst" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/dst" inside space "Shares Jail"
When user "Brian" moves file "/upload/file.txt" to "/dst/file.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /dst | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /dst | Shares Jail |
Scenario: as sharer moving a folder from one folder to an other changes the etags of both folders for all collaborators
Given user "Alice" has created folder "/dst"
And user "Alice" has created folder "/upload/toMove"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has shared folder "/dst" with user "Brian"
And user "Brian" has accepted share "/dst" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/dst" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/dst" inside space "Shares Jail"
When user "Alice" moves file "/upload/toMove" to "/dst/toMove" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /dst | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /dst | Shares Jail |
Scenario: as share reciever moving a folder from one folder to an other changes the etags of both folders for all collaborators
Given user "Alice" has created folder "/dst"
And user "Alice" has created folder "/upload/toMove"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has shared folder "/dst" with user "Brian"
And user "Brian" has accepted share "/dst" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/dst" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/dst" inside space "Shares Jail"
When user "Brian" moves file "/upload/toMove" to "/dst/toMove" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /dst | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /dst | Shares Jail |
Scenario: as share receiver creating a folder inside a folder received as a share changes its etag for all collaborators
Given user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Brian" creates a subfolder "/upload/new" in space "Shares Jail" using the WebDav Api
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: as sharer creating a folder inside a shared folder changes etag for all collaborators
Given user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Alice" creates folder "/upload/new" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: as share receiver uploading a file inside a folder received as a share changes its etag for all collaborators
Given user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Brian" uploads a file inside space "Shares Jail" with content "uploaded content" to "/upload/file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: as sharer uploading a file inside a shared folder should update etags for all collaborators
Given user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Alice" uploads file with content "uploaded content" to "/upload/file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: as share receiver overwriting a file inside a received shared folder should update etags for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Brian" uploads a file inside space "Shares Jail" with content "new content" to "/upload/file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: as sharer overwriting a file inside a shared folder should update etags for all collaborators
Given user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
When user "Alice" uploads file with content "new content" to "/upload/file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
Scenario: As share receiver deleting (removing) a file changes the etags of all parents for all collaborators
Given user "Alice" has created folder "/upload/sub"
And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/sub" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/sub" inside space "Shares Jail"
When user "Brian" removes the file "upload/sub/file.txt" from space "Shares Jail"
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/sub | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/sub | Shares Jail |
And these etags should not have changed
| user | path | space |
| Brian | / | Personal |
Scenario: As sharer deleting (removing) a file changes the etags of all parents for all collaborators
Given user "Alice" has created folder "/upload/sub"
And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/sub" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/sub" inside space "Shares Jail"
When user "Alice" removes the file "upload/sub/file.txt" from space "Personal"
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/sub | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/sub | Shares Jail |
And these etags should not have changed
| user | path | space |
| Brian | / | Personal |
Scenario: As share receiver deleting (removing) a folder changes the etags of all parents for all collaborators
Given user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/sub" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/sub" inside space "Shares Jail"
When user "Brian" removes the file "upload/sub/toDelete" from space "Shares Jail"
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/sub | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/sub | Shares Jail |
And these etags should not have changed
| user | path | space |
| Brian | / | Personal |
Scenario: As sharer deleting (removing) a folder changes the etags of all parents for all collaborators
Given user "Alice" has created folder "/upload/sub"
And user "Alice" has created folder "/upload/sub/toDelete"
And user "Alice" has shared folder "/upload" with user "Brian"
And user "Brian" has accepted share "/upload" offered by user "Alice"
And user "Alice" has stored etag of element "/" inside space "Personal"
And user "Alice" has stored etag of element "/upload" inside space "Personal"
And user "Alice" has stored etag of element "/upload/sub" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Personal"
And user "Brian" has stored etag of element "/" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload" inside space "Shares Jail"
And user "Brian" has stored etag of element "/upload/sub" inside space "Shares Jail"
When user "Alice" removes the file "upload/sub/toDelete" from space "Personal"
Then the HTTP status code should be "204"
And these etags should have changed
| user | path | space |
| Alice | / | Personal |
| Alice | /upload | Personal |
| Alice | /upload/sub | Personal |
| Brian | / | Shares Jail |
| Brian | /upload | Shares Jail |
| Brian | /upload/sub | Shares Jail |
And these etags should not have changed
| user | path | space |
| Brian | / | Personal |

View File

@@ -1,46 +0,0 @@
@api @skipOnOcV10
Feature: favorite
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
And user "Alice" has created folder "/PARENT"
Scenario: favorite a received share itself
Given user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/PARENT" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/PARENT" inside space "Shares Jail" should be favorited
Scenario: favorite a file inside of a received share
Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/PARENT/parent.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/PARENT/parent.txt" inside space "Shares Jail" should be favorited
Scenario: favorite a folder inside of a received share
Given user "Alice" has created folder "/PARENT/sub-folder"
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/PARENT/sub-folder" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/PARENT/sub-folder" inside space "Shares Jail" should be favorited
Scenario: sharee file favorite state should not change the favorite state of sharer
Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared file "/PARENT/parent.txt" with user "Brian"
And user "Brian" has accepted share "/parent.txt" offered by user "Alice"
When user "Brian" favorites element "/parent.txt" in space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/parent.txt" inside space "Shares Jail" should be favorited
And as user "Alice" file "/PARENT/parent.txt" inside space "Personal" should not be favorited

View File

@@ -1,302 +0,0 @@
@api @skipOnOcV10
Feature: move (rename) file
As a user
I want to be able to move and rename files
So that I can manage my file system
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
Scenario Outline: Moving a file within same space project with role manager and editor
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "newfolder" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| newfolder/insideSpace.txt |
And for user "Alice" the space "Project" should not contain these entries:
| insideSpace.txt |
Examples:
| role |
| manager |
| editor |
Scenario: Moving a file within same space project with role viewer
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created a folder "newfolder" in space "Project"
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "insideSpace.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
When user "Alice" moves file "insideSpace.txt" to "newfolder/insideSpace.txt" in space "Project" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Project" should not contain these entries:
| newfolder/insideSpace.txt |
And for user "Alice" the space "Project" should contain these entries:
| insideSpace.txt |
Scenario Outline: User moves a file from a space project with different a role to a space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project1" with content "Project1 content" to "project1.txt"
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
When user "Alice" moves file "project1.txt" from space "Project1" to "project1.txt" inside space "Project2" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
And for user "Alice" the space "Project1" should contain these entries:
| project1.txt |
And for user "Alice" the space "Project2" should not contain these entries:
| project1.txt |
Examples:
| from_role | to_role | https_status_code |
| manager | manager | 502 |
| editor | manager | 502 |
| manager | editor | 502 |
| editor | editor | 502 |
| manager | viewer | 403 |
| editor | viewer | 403 |
| viewer | manager | 403 |
| viewer | editor | 403 |
| viewer | viewer | 403 |
Scenario Outline: User moves a file from a space project with different role to a space personal
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
When user "Alice" moves file "project.txt" from space "Project" to "project.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
And for user "Alice" the space "Project" should contain these entries:
| project.txt |
And for user "Alice" the space "Personal" should not contain these entries:
| project.txt |
Examples:
| role | https_status_code |
| manager | 502 |
| editor | 502 |
| viewer | 403 |
Scenario Outline: User moves a file from space project with different role to space shares jail with different role (permission)
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded a file inside space "Project" with content "Project content" to "project.txt"
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" moves file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "502"
And for user "Alice" the space "Project" should contain these entries:
| project.txt |
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare/project.txt |
Examples:
| role | permissions |
| manager | 31 |
| editor | 31 |
| manager | 17 |
| editor | 17 |
| viewer | 31 |
| viewer | 17 |
Scenario Outline: User moves a file from space personal to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Alice" has uploaded file with content "personal space content" to "/personal.txt"
When user "Alice" moves file "personal.txt" from space "Personal" to "personal.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "<https_status_code>"
And for user "Alice" the space "Personal" should contain these entries:
| personal.txt |
And for user "Alice" the space "Project" should not contain these entries:
| personal.txt |
Examples:
| role | https_status_code |
| manager | 502 |
| editor | 502 |
| viewer | 403 |
Scenario Outline: User moves a file from space personal to space shares jail with different role (permission)
Given user "Brian" has created folder "/testshare"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
And user "Alice" has uploaded file with content "personal content" to "personal.txt"
When user "Alice" moves file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "502"
And for user "Alice" the space "Personal" should contain these entries:
| personal.txt |
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare/personal.txt |
Examples:
| permissions |
| 31 |
| 17 |
| 1 |
Scenario Outline: User moves a file from space shares jail with different role (permissions) to space personal
Given user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" moves file "/testshare/testshare.txt" from space "Shares Jail" to "testshare.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "502"
And for user "Alice" the space "Personal" should not contain these entries:
| testshare.txt |
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these entries:
| testshare.txt |
Examples:
| permissions |
| 31 |
| 17 |
| 1 |
Scenario Outline: User moves a file from space shares jail with different role (permissions) to space project with different role
Given the administrator has given "Brian" the role "Space Admin" using the settings api
And user "Brian" has created a space "Project" with the default quota using the GraphApi
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" moves file "/testshare/testshare.txt" from space "Shares Jail" to "testshare.txt" inside space "Project" using the WebDAV API
Then the HTTP status code should be "502"
And for user "Alice" the space "Project" should not contain these entries:
| /testshare.txt |
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these entries:
| testshare.txt |
Examples:
| role | permissions |
| manager | 31 |
| editor | 31 |
| viewer | 31 |
| manager | 17 |
| editor | 17 |
| viewer | 17 |
Scenario: User moves a file from space shares jail with role editor to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" folder "testshare2" of the space "Shares Jail" should contain these entries:
| testshare1.txt |
And for user "Alice" folder "testshare1" of the space "Shares Jail" should not contain these entries:
| testshare1.txt |
And for user "Brian" the space "Personal" should contain these entries:
| /testshare2/testshare1.txt |
Scenario: User moves a file from space shares jail with role editor to space shares jail with role viewer
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "31"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
Scenario: User moves a file from space shares jail with role viewer to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "17"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Shares Jail" should not contain these entries:
| /testshare2/testshare1.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
Scenario: Checking file id after a move between received shares
Given user "Alice" has created the following folders
| path |
| /folderA |
| /folderB |
And user "Alice" has shared folder "/folderA" with user "Brian"
And user "Alice" has shared folder "/folderB" with user "Brian"
And user "Brian" has accepted share "/folderA" offered by user "Alice"
And user "Brian" has accepted share "/folderB" offered by user "Alice"
And user "Brian" has created a folder "/folderA/ONE" in space "Shares Jail"
And user "Brian" has created a folder "/folderA/ONE/TWO" in space "Shares Jail"
And user "Brian" has stored id of folder "/folderA/ONE" of the space "Shares Jail"
When user "Brian" moves folder "/folderA/ONE" from space "Shares Jail" to "/folderB/ONE" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Brian" the space "Shares Jail" should contain these entries:
| /folderA |
And for user "Brian" folder "folderB" of the space "Shares Jail" should contain these entries:
| /ONE |
And for user "Brian" folder "folderA" of the space "Shares Jail" should not contain these entries:
| /ONE |
| /ONE/TWO |
And user "Brian" folder "/folderB/ONE" of the space "Shares Jail" should have the previously stored id
Scenario: Moving a file out of a shared folder as a sharer
Given user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "test data" to "/testshare/testfile.txt"
And user "Brian" has created a share with settings
| path | testshare |
| shareType | user |
| permissions | change |
| shareWith | Alice |
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Brian" moves file "/testshare/testfile.txt" from space "Personal" to "/testfile.txt" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/testfile.txt" for user "Brian" should be "test data"
And for user "Alice" folder "testshare" of the space "Shares Jail" should not contain these entries:
| testfile.txt |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare/testfile.txt |
Scenario: Moving a folder out of a shared folder as a sharer
Given user "Brian" has created the following folders
| path |
| /testshare |
| /testshare/testsubfolder |
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
And user "Brian" has created a share with settings
| path | testshare |
| shareType | user |
| permissions | change |
| shareWith | Alice |
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Brian" moves folder "/testshare/testsubfolder" from space "Personal" to "/testsubfolder" inside space "Personal" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data"
And for user "Alice" folder "testshare" of the space "Shares Jail" should not contain these entries:
| testsubfolder |
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare/testsubfolder |

View File

@@ -1,376 +0,0 @@
@api @skipOnOcV10
Feature: sharing
Background:
Given using OCS API version "1"
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
Scenario: Correct webdav share-permissions for received file with edit and reshare permissions
Given user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "/tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "19"
Scenario: Correct webdav share-permissions for received group shared file with edit and reshare permissions
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | share,update,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "19"
Scenario: Correct webdav share-permissions for received file with edit permissions but no reshare permissions
Given user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | update,read |
Then the HTTP status code should be "200"
And as user "Brian" file "/tmp.txt" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "3"
Scenario: Correct webdav share-permissions for received group shared file with edit permissions but no reshare permissions
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | update,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "3"
Scenario: Correct webdav share-permissions for received file with reshare permissions but no edit permissions
Given user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has shared file "tmp.txt" with user "Brian"
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,read |
Then the HTTP status code should be "200"
And as user "Brian" file "/tmp.txt" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "17"
Scenario: Correct webdav share-permissions for received group shared file with reshare permissions but no edit permissions
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | share,read |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp.txt" offered by user "Alice"
When user "Brian" gets the following properties of file "/tmp.txt" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "17"
Scenario: Correct webdav share-permissions for received folder with all permissions
Given user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "31"
Scenario: Correct webdav share-permissions for received group shared folder with all permissions
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "31"
Scenario: Correct webdav share-permissions for received folder with all permissions but edit
Given user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,delete,create,read |
Then the HTTP status code should be "200"
And as user "Brian" folder "/tmp" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "29"
Scenario: Correct webdav share-permissions for received group shared folder with all permissions but edit
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | share,delete,create,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "29"
Scenario: Correct webdav share-permissions for received folder with all permissions but create
Given user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,delete,update,read |
Then the HTTP status code should be "200"
And as user "Brian" folder "/tmp" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "27"
Scenario: Correct webdav share-permissions for received group shared folder with all permissions but create
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | share,delete,update,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "27"
Scenario: Correct webdav share-permissions for received folder with all permissions but delete
Given user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | share,create,update,read |
Then the HTTP status code should be "200"
And as user "Brian" folder "/tmp" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "23"
Scenario: Correct webdav share-permissions for received group shared folder with all permissions but delete
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | share,create,update,read |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "23"
Scenario: Correct webdav share-permissions for received folder with all permissions but share
Given user "Alice" has created folder "/tmp"
And user "Alice" has shared file "/tmp" with user "Brian"
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Alice" updates the last share using the sharing API with
| permissions | change |
Then the HTTP status code should be "200"
And as user "Brian" folder "/tmp" inside space "Shares Jail" should contain a property "ocs:share-permissions" with value "15"
Scenario: Correct webdav share-permissions for received group shared folder with all permissions but share
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | change |
And user "Brian" has accepted share "/tmp" offered by user "Alice"
When user "Brian" gets the following properties of folder "/tmp" inside space "Shares Jail" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "200"
And the single response should contain a property "ocs:share-permissions" with value "15"
Scenario: Uploading a file to a folder received as a read-only group share
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | read |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
Scenario: Uploading a file to a folder received as a upload-only user share
Given user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
"""
new description
"""
Scenario: Uploading a file to a folder received as a upload-only group share
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
"""
new description
"""
Scenario: Uploading a file to a folder received as a read/write user share
Given user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
"""
new description
"""
Scenario: Uploading a file to a folder received as a read/write group share
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | change |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
"""
new description
"""
Scenario: Uploading to a user shared folder with read/write permission when the sharer has insufficient quota
Given user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
Scenario: Uploading to a user shared folder with upload-only permission when the sharer has insufficient quota
Given user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads a file inside space "Shares Jail" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
Scenario: Uploading a file to a group shared folder with upload-only permission when the sharer has insufficient quota
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "10"
When user "Brian" uploads a file inside space "Shares Jail" with content "new descriptionfgshsywhhh" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
Scenario Outline: Sharer can download file uploaded with different permission by sharee to a shared folder
Given user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | <permissions> |
| shareWith | Brian |
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" uploads a file inside space "Shares Jail" with content "some content" to "/FOLDER/textfile.txt" using the WebDAV API
And user "Alice" downloads file "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "some content"
Examples:
| permissions |
| change |
| create |

View File

@@ -1,89 +0,0 @@
@api @skipOnOcV10
Feature: Share spaces
As the owner of a space
I want to be able to add members to a space, and to remove access for them
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
| Bob |
And the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "share space" with the default quota using the GraphApi
And using spaces DAV path
Scenario Outline:: A user can share a space to another user
When user "Alice" shares a space "share space" to user "Brian" with role "<role>"
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the user "Brian" should have a space called "share space" with these key and value pairs:
| key | value |
| driveType | project |
| id | %space_id% |
| name | share space |
Examples:
| role |
| manager |
| editor |
| viewer |
Scenario: A user can see who has been granted access
Given user "Alice" has shared a space "share space" to user "Brian" with role "viewer"
And the user "Alice" should have a space called "share space" granted to "Brian" with these key and value pairs:
| key | value |
| root@@@permissions@@@1@@@grantedTo@@@0@@@user@@@id | %user_id% |
| root@@@permissions@@@1@@@roles@@@0 | viewer |
Scenario: A user can see a file in a received shared space
Given user "Alice" has uploaded a file inside space "share space" with content "Test" to "test.txt"
And user "Alice" has created a folder "Folder Main" in space "share space"
When user "Alice" shares a space "share space" to user "Brian" with role "viewer"
Then for user "Brian" the space "share space" should contain these entries:
| test.txt |
| Folder Main |
Scenario: When a user unshares a space, the space becomes unavailable to the receiver
Given user "Alice" has shared a space "share space" to user "Brian" with role "viewer"
And the user "Brian" should have a space called "share space" with these key and value pairs:
| key | value |
| driveType | project |
| id | %space_id% |
| name | share space |
When user "Alice" unshares a space "share space" to user "Brian"
Then the HTTP status code should be "200"
Then the user "Brian" should not have a space called "share space"
Scenario Outline: Owner of a space cannot see the space after removing his access to the space
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
When user "<user>" unshares a space "share space" to user "Alice"
Then the HTTP status code should be "200"
And the user "Brian" should have a space called "share space" owned by "Alice" with these key and value pairs:
| key | value |
| driveType | project |
| id | %space_id% |
| name | share space |
But the user "Alice" should not have a space called "share space"
Examples:
| user |
| Alice |
| Brian |
Scenario: A user can add another user to the space managers to enable him
Given user "Alice" has uploaded a file inside space "share space" with content "Test" to "test.txt"
When user "Alice" shares a space "share space" to user "Brian" with role "manager"
Then the user "Brian" should have a space called "share space" granted to "Brian" with role "manager"
When user "Brian" shares a space "share space" to user "Bob" with role "viewer"
Then the user "Bob" should have a space called "share space" granted to "Bob" with role "viewer"
And for user "Bob" the space "share space" should contain these entries:
| test.txt |

View File

@@ -1,93 +0,0 @@
@api @skipOnOcV10
Feature: Share spaces via link
As the manager of a space
I want to be able to share a space via public link
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
And the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "share space" with the default quota using the GraphApi
And user "Alice" has uploaded a file inside space "share space" with content "some content" to "test.txt"
Scenario Outline: A manager can share a space to public via link with different permissions
When user "Alice" creates a public link share of the space "share space" with settings:
| permissions | <permissions> |
| password | <password> |
| name | <linkName> |
| expireDate | <expireDate> |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | <expectedPermissions> |
| share_type | public_link |
| displayname_owner | %displayname% |
| uid_owner | %username% |
| name | <linkName> |
And the public should be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "<password>"
And the downloaded content should be "some content"
But the public should not be able to download file "/test.txt" from inside the last public link shared folder using the new public WebDAV API with password "wrong pass"
Examples:
| permissions | expectedPermissions | password | linkName | expireDate |
| 1 | read | 123234 | link | 2042-03-25T23:59:59+0100 |
| 5 | read,create | qwerty 123 | | 2042-03-25T23:59:59+0100 |
| 15 | read,update,create,delete | d*V^o*Y03R9n8Z | link | |
Scenario: An uploader should be able to upload a file
When user "Alice" creates a public link share of the space "share space" with settings:
| permissions | 4 |
| password | 123 |
| name | forUpload |
| expireDate | 2042-03-25T23:59:59+0100 |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| item_type | folder |
| mimetype | httpd/unix-directory |
| file_target | / |
| path | / |
| permissions | create |
| share_type | public_link |
| displayname_owner | %displayname% |
| uid_owner | %username% |
| name | forUpload |
And the public should be able to upload file "lorem.txt" into the last public link shared folder using the new public WebDAV API with password "123"
And for user "Alice" the space "share space" should contain these entries:
| lorem.txt |
Scenario Outline: An user without manager role cannot share a space to public via link
Given user "Alice" has shared a space "share space" to user "Brian" with role "<role>"
When user "Brian" creates a public link share of the space "share space" with settings:
| permissions | 1 |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "No share permission"
And for user "Alice" the space "share space" should not contain the last created public link
Examples:
| role |
| viewer |
| editor |
Scenario: An user with manager role can share a space to public via link
Given user "Alice" has shared a space "share space" to user "Brian" with role "manager"
When user "Brian" creates a public link share of the space "share space" with settings:
| permissions | 1 |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And for user "Alice" the space "share space" should contain the last created public link

View File

@@ -1,78 +0,0 @@
@api @skipOnOcV10
Feature: Share a file or folder that is inside a space
As an user with manager space role
I want to be able to share the data inside the space
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
| Bob |
And using spaces DAV path
And the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "share sub-item" with the default quota using the GraphApi
And user "Alice" has created a folder "folder" in space "share sub-item"
And user "Alice" has uploaded a file inside space "share sub-item" with content "some content" to "file.txt"
And using new DAV path
Scenario Outline: A manager of the space can share an entity inside project space to another user with role
When user "Alice" shares the following entity "<entity>" inside of space "share sub-item" with user "Brian" with role "<role>"
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
When user "Brian" accepts share "/<entity>" offered by user "Alice" using the sharing API
And as "Brian" <type> "Shares/<entity>" should exist
Examples:
| entity | type | role |
| folder | folder | viewer |
| folder | folder | editor |
| file.txt | file | viewer |
| file.txt | file | editor |
Scenario Outline: An user participant of the project space with manager role can share an entity to another user
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "manager"
When user "Brian" shares the following entity "<entity>" inside of space "share sub-item" with user "Bob" with role "<role>"
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
When user "Bob" accepts share "/<entity>" offered by user "Brian" using the sharing API
And as "Bob" <type> "Shares/<entity>" should exist
Examples:
| entity | type | role |
| folder | folder | viewer |
| folder | folder | editor |
| file.txt | file | viewer |
| file.txt | file | editor |
Scenario Outline: An user participant of the project space without space manager role cannot share an entity to another user
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
When user "Brian" shares the following entity "<entity>" inside of space "share sub-item" with user "Bob" with role "editor"
Then the HTTP status code should be "<statusCode>"
And the OCS status code should be "<statusCode>"
And the OCS status message should be "<statusMessage>"
Examples:
| entity | spaceRole | statusCode | statusMessage |
| folder | editor | 404 | No share permission |
| file.txt | editor | 404 | No share permission |
| file.txt | viewer | 404 | No share permission |
| folder | viewer | 404 | No share permission |
Scenario Outline: An user participant of the project space can see the created resources share
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
When user "Alice" shares the following entity "file.txt" inside of space "share sub-item" with user "Bob" with role "editor"
Then for user "Alice" the space "share sub-item" should contain the last created share of the file "file.txt"
And for user "Brian" the space "share sub-item" should contain the last created share of the file "file.txt"
Examples:
| spaceRole |
| editor |
| viewer |
| manager |

View File

@@ -1,134 +0,0 @@
@api @skipOnOcV10
Feature: Share a file or folder that is inside a space via public link
As an user with manager space role
I want to be able to share the data inside the space via public link
folder permissions:
| role | permissions |
| viewer | 1 |
| uploader | 4 |
| contributor | 5 |
| editor | 15 |
file permissions:
| role | permissions |
| viewer | 1 |
| editor | 3 |
Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production
See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using spaces DAV path
And the administrator has given "Alice" the role "Space Admin" using the settings api
And user "Alice" has created a space "share sub-item" with the default quota using the GraphApi
And user "Alice" has created a folder "folder" in space "share sub-item"
And user "Alice" has uploaded a file inside space "share sub-item" with content "some content" to "folder/file.txt"
Scenario Outline: A manager of the space can share an entity inside project space via public link
When user "Alice" creates a public link share inside of space "share sub-item" with settings:
| path | <entity> |
| shareType | 3 |
| permissions | <permissions> |
| password | <password> |
| name | <name> |
| expireDate | <expireDate> |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| path | <path> |
Examples:
| entity | path | permissions | password | name | expireDate |
| folder | /folder |1 | 123 | link | 2042-03-25T23:59:59+0100 |
| folder | /folder |4 | | | |
| folder | /folder |5 | 200 | | 2042-03-25T23:59:59+0100 |
| folder | /folder |15 | | link | |
| folder/file.txt | /file.txt |1 | 123 | link | 2042-03-25T23:59:59+0100 |
| folder/file.txt | /file.txt |3 | 123 | link | 2042-03-25T23:59:59+0100 |
Scenario Outline: An user participant of the project space with space manager role can share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "manager"
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <entity> |
| shareType | 3 |
| permissions | 1 |
| password | 123 |
| name | public link |
| expireDate | 2042-03-25T23:59:59+0100 |
Then the HTTP status code should be "200"
And the OCS status code should be "200"
And the OCS status message should be "OK"
And the fields of the last response to user "Alice" should include
| path | <path> |
Examples:
| entity | path |
| folder | /folder |
| folder/file.txt | /file.txt |
Scenario Outline: An user participant of the project space without space manager role cannot share an entity inside project space via public link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
When user "Brian" creates a public link share inside of space "share sub-item" with settings:
| path | <entity> |
| shareType | 3 |
| permissions | 1 |
| password | 123 |
| name | public link |
| expireDate | 2042-03-25T23:59:59+0100 |
Then the HTTP status code should be "404"
And the OCS status code should be "404"
And the OCS status message should be "No share permission"
Examples:
| entity | spaceRole |
| folder | editor |
| folder | viewer |
| folder/file.txt | editor |
| folder/file.txt | viewer |
Scenario Outline: User creates a new public link share of a file with edit permissions
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "Random data" to "/file.txt"
When user "Alice" creates a public link share using the sharing API with settings
| path | file.txt |
| permissions | read,update |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the fields of the last response to user "Alice" should include
| item_type | file |
| mimetype | text/plain |
| file_target | /file.txt |
| path | /file.txt |
| permissions | read,update |
| share_type | public_link |
| displayname_file_owner | %displayname% |
| displayname_owner | %displayname% |
| uid_file_owner | %username% |
| uid_owner | %username% |
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"
And the public upload to the last publicly shared file using the new public WebDAV API should pass with HTTP status code "204"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: An user participant of the project space can see the created public resources link
Given user "Alice" has shared a space "share sub-item" to user "Brian" with role "<spaceRole>"
When user "Alice" creates a public link share inside of space "share sub-item" with settings:
| path | folder/file.txt |
| shareType | 3 |
| permissions | 1 |
Then for user "Brian" the space "share sub-item" should contain the last created public link of the file "folder/file.txt"
Examples:
| spaceRole |
| editor |
| viewer |
| manager |

View File

@@ -1,299 +0,0 @@
@api @skipOnOcV10
Feature: upload resources on share using TUS protocol
As a user
I want to be able to upload files
So that I can store and share files between multiple client systems
Background:
Given using spaces DAV path
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
Scenario: upload file with mtime to a received share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares Jail" should contain these entries:
| file.txt |
And as "Brian" the mtime of the file "/toShare/file.txt" in space "Shares Jail" should be "Thu, 08 Aug 2012 04:18:13 GMT"
And as "Alice" the mtime of the file "/toShare/file.txt" in space "Personal" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Scenario: upload file with mtime to a sent share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Alice" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Personal" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And as "Alice" the mtime of the file "/toShare/file.txt" in space "Personal" should be "Thu, 08 Aug 2012 04:18:13 GMT"
And as "Brian" the mtime of the file "/toShare/file.txt" in space "Shares Jail" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Scenario: overwriting a file with mtime in a received share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
And user "Alice" has uploaded file with content "uploaded content" to "/toShare/file.txt"
When user "Brian" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares Jail" should contain these entries:
| file.txt |
And as "Brian" the mtime of the file "/toShare/file.txt" in space "Shares Jail" should be "Thu, 08 Aug 2012 04:18:13 GMT"
And as "Alice" the mtime of the file "/toShare/file.txt" in space "Personal" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Scenario: overwriting a file with mtime in a sent share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
And user "Brian" has uploaded a file inside space "Shares Jail" with content "uploaded content" to "toShare/file.txt"
When user "Alice" uploads a file "filesForUpload/textfile.txt" to "toShare/file.txt" with mtime "Thu, 08 Aug 2012 04:18:13 GMT" via TUS inside of the space "Personal" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And as "Alice" the mtime of the file "/toShare/file.txt" in space "Personal" should be "Thu, 08 Aug 2012 04:18:13 GMT"
And as "Brian" the mtime of the file "/toShare/file.txt" in space "Shares Jail" should be "Thu, 08 Aug 2012 04:18:13 GMT"
Scenario: attempt to upload a file into a nonexistent folder within correctly received share
Given using OCS API version "1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares Jail" should not contain these entries:
| nonExistentFolder/file.txt |
Scenario: attempt to upload a file into a nonexistent folder within correctly received read only share
Given using OCS API version "1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "read"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/nonExistentFolder/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares Jail" should not contain these entries:
| nonExistentFolder/file.txt |
Scenario: Uploading a file to a received share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And for user "Alice" the content of the file "toShare/file.txt" of the space "Personal" should be "uploaded content"
Scenario: Uploading a file to a user read/write share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "change"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And for user "Alice" the content of the file "toShare/file.txt" of the space "Personal" should be "uploaded content"
Scenario: Uploading a file into a group share as a share receiver
Given group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "toShare" with group "grp1" with permissions "change"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And for user "Alice" the content of the file "toShare/file.txt" of the space "Personal" should be "uploaded content"
Scenario: Overwrite file to a received share folder
Given user "Alice" has created folder "/toShare"
And user "Alice" has uploaded file with content "original content" to "/toShare/file.txt"
And user "Alice" has shared folder "/toShare" with user "Brian"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "overwritten content" to "/toShare/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Alice" folder "toShare" of the space "Personal" should contain these entries:
| file.txt |
And for user "Alice" the content of the file "toShare/file.txt" of the space "Personal" should be "overwritten content"
Scenario: attempt to upload a file into a folder within correctly received read only share
Given user "Alice" has created folder "/toShare"
And user "Alice" has shared folder "/toShare" with user "Brian" with permissions "read"
And user "Brian" has accepted share "/toShare" offered by user "Alice"
When user "Brian" uploads a file with content "uploaded content" to "/toShare/file.txt" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Brian" folder "toShare" of the space "Shares Jail" should not contain these entries:
| file.txt |
Scenario: Upload a file to shared folder with checksum should return the checksum in the propfind for sharee
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 5 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
When user "Brian" requests the checksum of file "/FOLDER/textFile.txt" in space "Shares Jail" via propfind using the WebDAV API
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964 MD5:827ccb0eea8a706c4c34a16891f84e7b ADLER32:02f80100"
Scenario: Upload a file to shared folder with checksum should return the checksum in the download header for sharee
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 5 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d069ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
When user "Brian" downloads the file "/FOLDER/textFile.txt" of the space "Shares Jail" using the WebDAV API
Then the header checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964"
Scenario: Sharer shares a file with correct checksum should return the checksum in the propfind for sharee
Given user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 5 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Brian" has accepted share "/textFile.txt" offered by user "Alice"
When user "Brian" requests the checksum of file "/textFile.txt" in space "Shares Jail" via propfind using the WebDAV API
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964 MD5:827ccb0eea8a706c4c34a16891f84e7b ADLER32:02f80100"
Scenario: Sharer shares a file with correct checksum should return the checksum in the download header for sharee
Given user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 5 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513964" to the last created TUS Location with offset "0" and content "12345" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Brian" has accepted share "/textFile.txt" offered by user "Alice"
When user "Brian" downloads the file "/textFile.txt" of the space "Shares Jail" using the WebDAV API
Then the header checksum should match "SHA1:8cb2237d0679ca88db6464eac60da96345513964"
Scenario: Sharee uploads a file to a received share folder with correct checksum
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" creates a new TUS resource for the space "Shares Jail" using the WebDAV API with these headers:
| Upload-Length | 16 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
And user "Brian" uploads file with checksum "MD5 827ccb0eea8a706c4c34a16891f84e7b" to the last created TUS Location with offset "0" and content "uploaded content" via TUS inside of the space "Shares Jail" using the WebDAV API
Then for user "Alice" folder "FOLDER" of the space "Personal" should contain these entries:
| textFile.txt |
And for user "Alice" the content of the file "FOLDER/textFile.txt" of the space "Personal" should be "uploaded content"
Scenario: Sharee uploads a file to a received share folder with wrong checksum should not work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
When user "Brian" creates a new TUS resource for the space "Shares Jail" using the WebDAV API with these headers:
| Upload-Length | 16 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
And user "Brian" uploads file with checksum "MD5 827ccb0eea8a706c4c34a16891f84e8c" to the last created TUS Location with offset "0" and content "uploaded content" via TUS inside of the space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "406"
And for user "Alice" folder "FOLDER" of the space "Personal" should not contain these entries:
| textFile.txt |
Scenario: Sharer uploads a file to shared folder with wrong checksum should not work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 5 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
When user "Alice" uploads file with checksum "SHA1 8cb2237d0679ca88db6464eac60da96345513954" to the last created TUS Location with offset "0" and content "uploaded content" via TUS inside of the space "Personal" using the WebDAV API
Then the HTTP status code should be "406"
And for user "Alice" folder "FOLDER" of the space "Personal" should not contain these entries:
| textFile.txt |
And for user "Brian" folder "FOLDER" of the space "Shares Jail" should not contain these entries:
| textFile.txt |
Scenario: Sharer uploads a chunked file with correct checksum and share it with sharee should work
Given user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 10 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
When user "Alice" sends a chunk to the last created TUS Location with offset "0" and data "01234" with checksum "MD5 4100c4d44da9177247e44a5fc1546778" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" sends a chunk to the last created TUS Location with offset "5" and data "56789" with checksum "MD5 099ebea48ea9666a7da2177267983138" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" shares file "textFile.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/textFile.txt" offered by user "Alice" using the sharing API
Then for user "Brian" the content of the file "/textFile.txt" of the space "Shares Jail" should be "0123456789"
Scenario: Sharee uploads a chunked file with correct checksum to a received share folder should work
Given user "Alice" has created folder "/FOLDER"
And user "Alice" has shared folder "/FOLDER" with user "Brian"
And user "Brian" has accepted share "/FOLDER" offered by user "Alice"
And user "Brian" has created a new TUS resource for the space "Shares Jail" using the WebDAV API with these headers:
| Upload-Length | 10 |
# L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt
| Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= |
| Tus-Resumable | 1.0.0 |
When user "Brian" sends a chunk to the last created TUS Location with offset "0" and data "01234" with checksum "MD5 4100c4d44da9177247e44a5fc1546778" via TUS inside of the space "Shares Jail" using the WebDAV API
And user "Brian" sends a chunk to the last created TUS Location with offset "5" and data "56789" with checksum "MD5 099ebea48ea9666a7da2177267983138" via TUS inside of the space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Alice" folder "FOLDER" of the space "Personal" should contain these entries:
| textFile.txt |
And for user "Alice" the content of the file "/FOLDER/textFile.txt" of the space "Personal" should be "0123456789"
Scenario: Sharer uploads a file with checksum and as a sharee overwrites the shared file with new data and correct checksum
Given user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 16 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 c1dab0c0864b6ac9bdd3743a1408d679f1acd823" to the last created TUS Location with offset "0" and content "original content" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Brian" has accepted share "/textFile.txt" offered by user "Alice"
When user "Brian" overwrites recently shared file with offset "0" and data "overwritten content" with checksum "SHA1 fe990d2686a0fc86004efc31f5bf2475a45d4905" via TUS inside of the space "Shares Jail" using the WebDAV API with these headers:
| Upload-Length | 19 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
Then the HTTP status code should be "204"
And for user "Alice" the content of the file "/textFile.txt" of the space "Personal" should be "overwritten content"
Scenario: Sharer uploads a file with checksum and as a sharee overwrites the shared file with new data and invalid checksum
Given user "Alice" has created a new TUS resource for the space "Personal" using the WebDAV API with these headers:
| Upload-Length | 16 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
And user "Alice" has uploaded file with checksum "SHA1 c1dab0c0864b6ac9bdd3743a1408d679f1acd823" to the last created TUS Location with offset "0" and content "original content" via TUS inside of the space "Personal" using the WebDAV API
And user "Alice" has shared file "/textFile.txt" with user "Brian"
And user "Brian" has accepted share "/textFile.txt" offered by user "Alice"
When user "Brian" overwrites recently shared file with offset "0" and data "overwritten content" with checksum "SHA1 fe990d2686a0fc86004efc31f5bf2475a45d4906" via TUS inside of the space "Shares Jail" using the WebDAV API with these headers:
| Upload-Length | 19 |
# dGV4dEZpbGUudHh0 is the base64 encode of textFile.txt
| Upload-Metadata | filename dGV4dEZpbGUudHh0 |
| Tus-Resumable | 1.0.0 |
Then the HTTP status code should be "406"
And for user "Alice" the content of the file "/textFile.txt" of the space "Personal" should be "original content"