From 8113997a84e5676d4b110fd9f9b813f2bd6d379b Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Tue, 6 Aug 2024 17:12:33 +0545 Subject: [PATCH] added test for copying files between spaces with secure viewer role Signed-off-by: prashant-gurung899 --- .../apiSpacesShares/copySpaces.feature | 6 ++--- .../coreApiWebdavProperties/copyFile.feature | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/apiSpacesShares/copySpaces.feature b/tests/acceptance/features/apiSpacesShares/copySpaces.feature index bb65a2a8ed..8f54594726 100644 --- a/tests/acceptance/features/apiSpacesShares/copySpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/copySpaces.feature @@ -268,7 +268,7 @@ Feature: copy file | Editor | | Viewer | - @issue-9334 + @issue-9482 Scenario: user copies a file from share space with secure viewer role to personal space Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created folder "/testshare" @@ -314,7 +314,7 @@ Feature: copy file | Space Editor | Editor | | Space Editor | Viewer | - + @issue-9482 Scenario Outline: user copies a file from share space with secure viewer role to project space with different role Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API And user "Brian" has created a space "Project" with the default quota using the Graph API @@ -399,7 +399,7 @@ Feature: copy file | Editor | | Viewer | - + @issue-9482 Scenario Outline: user copies a file from share space with different role to share space with role viewer or Secure viewer Given user "Brian" has created folder "/testshare1" And user "Brian" has created folder "/testshare2" diff --git a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature index 61c9ca14a9..bf630a931d 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature @@ -979,3 +979,26 @@ 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 + 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 |