add test cases for copying file when shared with secure viewer

This commit is contained in:
Sabin
2024-08-09 17:00:25 +05:45
committed by prashant-gurung899
parent 746acf96ea
commit c1f45fc1e0
2 changed files with 58 additions and 109 deletions
@@ -8,13 +8,13 @@ Basic file management like up and download, move, copy, properties, trash, versi
#### [COPY a folder to received share file/folder seems to work but no change in shares](https://github.com/owncloud/ocis/issues/6999)
- [coreApiWebdavProperties/copyFile.feature:284](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L284)
- [coreApiWebdavProperties/copyFile.feature:285](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L285)
- [coreApiWebdavProperties/copyFile.feature:308](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L308)
- [coreApiWebdavProperties/copyFile.feature:309](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L309)
- [coreApiWebdavProperties/copyFile.feature:482](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L482)
- [coreApiWebdavProperties/copyFile.feature:483](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L483)
- [coreApiWebdavProperties/copyFile.feature:286](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L286)
- [coreApiWebdavProperties/copyFile.feature:287](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L287)
- [coreApiWebdavProperties/copyFile.feature:310](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L310)
- [coreApiWebdavProperties/copyFile.feature:311](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L311)
- [coreApiWebdavProperties/copyFile.feature:484](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L484)
- [coreApiWebdavProperties/copyFile.feature:485](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L485)
- [coreApiWebdavProperties/copyFile.feature:486](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L486)
#### [Custom dav properties with namespaces are rendered incorrectly](https://github.com/owncloud/ocis/issues/2140)
@@ -174,11 +174,11 @@ And other missing implementation of favorites
#### [copying the file inside Shares folder returns 412](https://github.com/owncloud/ocis/issues/3874)
- [coreApiWebdavProperties/copyFile.feature:238](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L238)
- [coreApiWebdavProperties/copyFile.feature:239](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L239)
- [coreApiWebdavProperties/copyFile.feature:455](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L455)
- [coreApiWebdavProperties/copyFile.feature:456](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L456)
- [coreApiWebdavProperties/copyFile.feature:240](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L240)
- [coreApiWebdavProperties/copyFile.feature:241](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L241)
- [coreApiWebdavProperties/copyFile.feature:457](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L457)
- [coreApiWebdavProperties/copyFile.feature:458](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L458)
- [coreApiWebdavProperties/copyFile.feature:459](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L459)
### Won't fix
@@ -189,9 +189,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
#### [Blacklist files extensions](https://github.com/owncloud/ocis/issues/2177)
- [coreApiWebdavProperties/copyFile.feature:107](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L107)
- [coreApiWebdavProperties/copyFile.feature:108](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L108)
- [coreApiWebdavProperties/copyFile.feature:109](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L109)
- [coreApiWebdavProperties/copyFile.feature:110](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L110)
- [coreApiWebdavProperties/copyFile.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L111)
- [coreApiWebdavProperties/createFileFolder.feature:95](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L95)
- [coreApiWebdavProperties/createFileFolder.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L96)
- [coreApiWebdavProperties/createFileFolder.feature:97](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L97)
@@ -233,9 +233,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
### [COPY file/folder to same name is possible (but 500 code error for folder with spaces path)](https://github.com/owncloud/ocis/issues/8711)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L198)
- [coreApiWebdavProperties/copyFile.feature:979](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L979)
- [coreApiWebdavProperties/copyFile.feature:980](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L980)
- [coreApiWebdavProperties/copyFile.feature:981](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L981)
- [coreApiWebdavProperties/copyFile.feature:1064](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1064)
- [coreApiWebdavProperties/copyFile.feature:1065](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1065)
- [coreApiWebdavProperties/copyFile.feature:1066](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1066)
Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end.
@@ -692,26 +692,6 @@ Feature: copy file
| old |
| new |
Scenario Outline: copying a file into a shared folder shared via viewer and secure viewer permissions as the sharee
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Alice" copies file "/textfile0.txt" to "/Shares/testshare/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "403"
Examples:
| dav-path-version | permissions-role |
| old | Viewer |
| new | Viewer |
| old | Secure viewer |
| new | Secure viewer |
@skipOnReva
Scenario Outline: copying a file into a shared folder as the sharer
Given using <dav-path-version> DAV path
@@ -757,8 +737,29 @@ Feature: copy file
| old |
| new |
@skipOnReva
Scenario Outline: sharee copies a file from a shared folder, shared with viewer permission
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "hello world" to "testshare/fileInsideShare.txt"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/fileInsideShare.txt" should exist
Examples:
| dav-path-version |
| old |
| new |
Scenario Outline: copying a file out of a shared folder shared via secure viewer permissions as the sharee
@skipOnReva
Scenario Outline: sharee copies a file from a shared folder, shared with secure viewer permission
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare"
@@ -769,8 +770,9 @@ Feature: copy file
| sharee | Alice |
| shareType | user |
| permissionsRole | Secure viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "500"
Then the HTTP status code should be "403"
And as "Alice" file "/fileInsideShare.txt" should not exist
Examples:
| dav-path-version |
@@ -856,13 +858,14 @@ Feature: copy file
| old |
| new |
@skipOnReva
Scenario Outline: copying a file between shares received from different users when one share is shared via Viewer and Secure viewer permission
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Carol" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare0"
And user "Brian" has uploaded file with content "content inside testshare0" to "/testshare0/testshare0.txt"
And user "Brian" has created folder "/testshare0/folder_to_copy/"
And user "Carol" has created folder "/testshare1"
And user "Brian" has sent the following resource share invitation:
| resource | testshare0 |
@@ -870,26 +873,31 @@ Feature: copy file
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-1> |
And user "Alice" has a share "testshare0" synced
And user "Carol" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-2> |
And user "Alice" has a share "testshare1" synced
When user "Alice" copies folder "/Shares/testshare0/folder_to_copy/" to "/Shares/testshare1/folder_to_copy/" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" folder "/Shares/testshare1/folder_to_copy/" should not exist
When user "Alice" copies file "/Shares/testshare0/testshare0.txt" to "/Shares/testshare1/testshare0.txt" using the WebDAV API
Then the HTTP status code should be "<status-code>"
Then the HTTP status code should be "403"
And as "Alice" file "/Shares/testshare1/testshare0.txt" should not exist
Examples:
| dav-path-version | permissions-role-1 | permissions-role-2 | status-code |
| old | Secure viewer | Editor | 500 |
| new | Secure viewer | Editor | 500 |
| old | Secure viewer | Secure viewer | 403 |
| new | Secure viewer | Secure viewer | 403 |
| old | Secure viewer | Viewer | 403 |
| new | Secure viewer | Viewer | 403 |
| old | Editor | Secure viewer | 403 |
| new | Editor | Secure viewer | 403 |
| old | Viewer | Secure viewer | 403 |
| new | Viewer | Secure viewer | 403 |
| dav-path-version | permissions-role-1 | permissions-role-2 |
| old | Secure viewer | Secure viewer |
| new | Secure viewer | Secure viewer |
| old | Secure viewer | Viewer |
| new | Secure viewer | Viewer |
| old | Editor | Secure viewer |
| new | Editor | Secure viewer |
| old | Viewer | Secure viewer |
| new | Viewer | Secure viewer |
@skipOnReva
Scenario Outline: copying a folder between shares received from different users
@@ -925,42 +933,6 @@ Feature: copy file
| old |
| new |
Scenario Outline: copying a folder between shares received from different users when one share is shared via Secure viewer
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Carol" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/testshare0"
And user "Brian" has created folder "/testshare0/folder_to_copy/"
And user "Carol" has created folder "/testshare1"
And user "Brian" has sent the following resource share invitation:
| resource | testshare0 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-1> |
And user "Carol" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-2> |
When user "Alice" copies file "/Shares/testshare0/folder_to_copy/" to "/Shares/testshare1/folder_to_copy/" using the WebDAV API
Then the HTTP status code should be "<status-code>"
Examples:
| dav-path-version | permissions-role-1 | permissions-role-2 | status-code |
| old | Secure viewer | Editor | 201 |
| new | Secure viewer | Editor | 201 |
| old | Secure viewer | Secure viewer | 403 |
| new | Secure viewer | Secure viewer | 403 |
| old | Secure viewer | Viewer | 403 |
| new | Secure viewer | Viewer | 403 |
| old | Editor | Secure viewer | 403 |
| new | Editor | Secure viewer | 403 |
| old | Viewer | Secure viewer | 403 |
| new | Viewer | Secure viewer | 403 |
@skipOnReva
Scenario Outline: copying a file to a folder that is shared with multiple users
Given using <dav-path-version> DAV path
@@ -1092,26 +1064,3 @@ Feature: copy file
| old |
| new |
| spaces |
@issue-9482
Scenario Outline: try to copy a file from shares space with secure viewer role to personal space
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And the administrator has assigned the role "Space Admin" to user "Brian" using the Graph 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 sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Secure viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" copies file "/Shares/testshare/testshare.txt" to "/testshare.txt" using the WebDAV API
Then the HTTP status code should be "403"
And for user "Alice" the space "Personal" should not contain these entries:
| /testshare.txt |
Examples:
| dav-path-version |
| old |
| new |