Skip to content

Commit

Permalink
extending test cases for copying file when shared with secure viewer …
Browse files Browse the repository at this point in the history
…role
  • Loading branch information
S-Panta committed Jun 21, 2024
1 parent 7f7e847 commit 22dfd89
Showing 1 changed file with 110 additions and 8 deletions.
118 changes: 110 additions & 8 deletions tests/acceptance/features/coreApiWebdavProperties/copyFile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,20 @@ Feature: copy file
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 | Viewer |
| 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"
And user "Alice" should not be able to download file "/Shares/testshare/textfile0.txt"
Examples:
| dav-path-version |
| old |
| new |
| dav-path-version | permissions-role |
| old | Viewer |
| new | Viewer |
| old | Secure viewer |
| new | Secure viewer |

@skipOnReva
Scenario Outline: copying a file to overwrite a file into a folder with no permissions
Expand Down Expand Up @@ -692,6 +694,26 @@ 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
Expand Down Expand Up @@ -735,6 +757,26 @@ Feature: copy file
| old |
| new |


Scenario Outline: copying a file out of a shared folder shared via 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 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 | Secure viewer |
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "500"
And as "Alice" file "/fileInsideShare.txt" should not exist
Examples:
| dav-path-version |
| old |
| new |

@skipOnReva
Scenario Outline: copying a file out of a shared folder as the sharer
Given using <dav-path-version> DAV path
Expand Down Expand Up @@ -815,6 +857,36 @@ Feature: copy file
| old |
| new |


Scenario Outline: copying a file 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 uploaded file with content "content inside testshare0" to "/testshare0/testshare0.txt"
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/testshare0.txt" to "/Shares/testshare1/testshare0.txt" 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 | 500 |
| new | Secure viewer | Secure viewer | 403 |
| old | Secure viewer | Viewer | 403 |
| old | Editor | Secure viewer | 403 |
| new | Viewer | Secure viewer | 403 |

@skipOnReva
Scenario Outline: copying a folder between shares received from different users
Given using <dav-path-version> DAV path
Expand Down Expand Up @@ -847,6 +919,36 @@ 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 | 500 |
| new | Secure viewer | Secure viewer | 403 |
| old | Secure viewer | Viewer | 403 |
| old | Editor | 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
Expand Down

0 comments on commit 22dfd89

Please sign in to comment.