copy feature files from core

This commit is contained in:
Saw-jan
2023-01-05 09:22:52 +05:45
committed by Phil Davis
parent 35d4cb53ae
commit c59392bc1e
336 changed files with 52903 additions and 0 deletions
@@ -0,0 +1,22 @@
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: resharing can be done on a reshared resource
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
Scenario: Reshared files can be still accessed if a user in the middle removes it.
Given user "Carol" has been created with default attributes and without skeleton files
And user "David" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has moved file "/textfile0.txt" to "/textfile0_shared.txt"
And user "Brian" has shared file "textfile0_shared.txt" with user "Carol"
And user "Carol" has shared file "textfile0_shared.txt" with user "David"
When user "Brian" deletes file "/textfile0_shared.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/textfile0_shared.txt" for user "Carol" should be "ownCloud test text file 0"
And the content of file "/textfile0_shared.txt" for user "David" should be "ownCloud test text file 0"
@@ -0,0 +1,38 @@
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: resharing can be disabled
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
@smokeTest
Scenario Outline: resharing a file is not allowed when allow resharing has been disabled
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "Alice" has shared file "/textfile0.txt" with user "Brian" with permissions "share,update,read"
And parameter "shareapi_allow_resharing" of app "core" has been set to "no"
When user "Brian" shares file "/textfile0.txt" with user "Carol" with permissions "share,update,read" using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
And as "Carol" file "/textfile0.txt" should not exist
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |
Scenario Outline: ordinary sharing is allowed when allow resharing has been disabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_allow_resharing" of app "core" has been set to "no"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
When user "Alice" shares file "/textfile0.txt" with user "Brian" with permissions "share,update,read" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as "Brian" file "/textfile0.txt" should exist
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,143 @@
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: a subfolder of a received share can be reshared
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
@smokeTest
Scenario Outline: User is allowed to reshare a sub-folder with the same permissions
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/TMP"
And user "Alice" has created folder "/TMP/SUB"
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read"
When user "Brian" shares folder "/TMP/SUB" with user "Carol" with permissions "share,read" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as "Carol" folder "/SUB" should exist
And as "Brian" folder "/TMP/SUB" should exist
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: User is not allowed to reshare a sub-folder with more permissions
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/TMP"
And user "Alice" has created folder "/TMP/SUB"
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions <received_permissions>
When user "Brian" shares folder "/TMP/SUB" with user "Carol" with permissions <reshare_permissions> using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
And as "Carol" folder "/SUB" should not exist
But as "Brian" folder "/TMP/SUB" should exist
Examples:
| ocs_api_version | http_status_code | received_permissions | reshare_permissions |
# try to pass on more bits including reshare
| 1 | 200 | 17 | 19 |
| 2 | 404 | 17 | 19 |
| 1 | 200 | 17 | 21 |
| 2 | 404 | 17 | 21 |
| 1 | 200 | 17 | 23 |
| 2 | 404 | 17 | 23 |
| 1 | 200 | 17 | 31 |
| 2 | 404 | 17 | 31 |
| 1 | 200 | 19 | 23 |
| 2 | 404 | 19 | 23 |
| 1 | 200 | 19 | 31 |
| 2 | 404 | 19 | 31 |
# try to pass on more bits but not reshare
| 1 | 200 | 17 | 3 |
| 2 | 404 | 17 | 3 |
| 1 | 200 | 17 | 5 |
| 2 | 404 | 17 | 5 |
| 1 | 200 | 17 | 7 |
| 2 | 404 | 17 | 7 |
| 1 | 200 | 17 | 15 |
| 2 | 404 | 17 | 15 |
| 1 | 200 | 19 | 7 |
| 2 | 404 | 19 | 7 |
| 1 | 200 | 19 | 15 |
| 2 | 404 | 19 | 15 |
# try to pass on extra delete (including reshare)
| 1 | 200 | 17 | 25 |
| 2 | 404 | 17 | 25 |
| 1 | 200 | 19 | 27 |
| 2 | 404 | 19 | 27 |
| 1 | 200 | 23 | 31 |
| 2 | 404 | 23 | 31 |
# try to pass on extra delete (but not reshare)
| 1 | 200 | 17 | 9 |
| 2 | 404 | 17 | 9 |
| 1 | 200 | 19 | 11 |
| 2 | 404 | 19 | 11 |
| 1 | 200 | 23 | 15 |
| 2 | 404 | 23 | 15 |
Scenario Outline: User is allowed to update reshare of a sub-folder with less permissions
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/TMP"
And user "Alice" has created folder "/TMP/SUB"
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read"
And user "Brian" has shared folder "/TMP/SUB" with user "Carol" with permissions "share,create,update,read"
When user "Brian" updates the last share using the sharing API with
| permissions | share,read |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as "Carol" folder "/SUB" should exist
But user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt"
And as "Brian" folder "/TMP/SUB" should exist
And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: User is allowed to update reshare of a sub-folder to the maximum allowed permissions
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/TMP"
And user "Alice" has created folder "/TMP/SUB"
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read"
And user "Brian" has shared folder "/TMP/SUB" with user "Carol" with permissions "share,read"
When user "Brian" updates the last share using the sharing API with
| permissions | share,create,update,read |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as "Carol" folder "/SUB" should exist
And user "Carol" should be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt"
And as "Brian" folder "/TMP/SUB" should exist
And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: User is not allowed to update reshare of a sub-folder with more permissions
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/TMP"
And user "Alice" has created folder "/TMP/SUB"
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read"
And user "Brian" has shared folder "/TMP/SUB" with user "Carol" with permissions "share,read"
When user "Brian" updates the last share using the sharing API with
| permissions | all |
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
And as "Carol" folder "/SUB" should exist
But user "Carol" should not be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt"
And as "Brian" folder "/TMP/SUB" should exist
But user "Brian" should not be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |
@@ -0,0 +1,44 @@
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: resharing a resource with an expiration date
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
Scenario Outline: User should not be able to re-share a folder to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "Carol" has been created with default attributes and without skeleton files
And group "grp1" has been created
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/PARENT"
And user "Alice" has shared folder "/PARENT" with user "Brian"
When user "Brian" shares folder "/PARENT" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "Carol" folder "/PARENT" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |
Scenario Outline: User should not be able to re-share a file to a group which he/she is not member of when share with only member group is enabled
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_only_share_with_membership_groups" of app "core" has been set to "yes"
And user "Carol" has been created with default attributes and without skeleton files
And group "grp1" has been created
And user "Carol" has been added to group "grp1"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "Alice" has shared file "/textfile0.txt" with user "Brian"
When user "Brian" shares folder "/textfile0.txt" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And as "Carol" folder "/textfile0.txt" should not exist
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 403 | 200 |
| 2 | 403 | 403 |