From 2b0c6f9de4733e044f40f1e07cb0b89b5587d525 Mon Sep 17 00:00:00 2001 From: pradip Date: Mon, 2 Dec 2024 10:14:07 +0545 Subject: [PATCH] test: share with Denied role in Personal and Project space --- tests/acceptance/TestHelpers/GraphHelper.php | 1 + .../apiSharingNg1/sharedWithMe.feature | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/tests/acceptance/TestHelpers/GraphHelper.php b/tests/acceptance/TestHelpers/GraphHelper.php index ce300dfe837..21aa08e0ace 100644 --- a/tests/acceptance/TestHelpers/GraphHelper.php +++ b/tests/acceptance/TestHelpers/GraphHelper.php @@ -43,6 +43,7 @@ class GraphHelper { public const ADDITIONAL_PERMISSIONS_ROLES = [ 'Secure Viewer' => 'aa97fe03-7980-45ac-9e50-b325749fd7e6', 'Space Editor Without Versions' => '3284f2d5-0070-4ad8-ac40-c247f7c1fb27', + 'Denied' => '63e64e19-8d43-42ec-a738-2b6af2610efa', ]; public const SHARES_SPACE_ID = 'a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668'; diff --git a/tests/acceptance/features/apiSharingNg1/sharedWithMe.feature b/tests/acceptance/features/apiSharingNg1/sharedWithMe.feature index 65cf39ff4a0..509f6f7fb35 100755 --- a/tests/acceptance/features/apiSharingNg1/sharedWithMe.feature +++ b/tests/acceptance/features/apiSharingNg1/sharedWithMe.feature @@ -5232,3 +5232,45 @@ Feature: an user gets the resources shared to them And the json response should contain the following shares: | textfile.txt | | FolderToShare | + + @env-config + Scenario Outline: check the permission access while sharing a resource with denied permission role (Personal Space) + Given using spaces DAV path + And the administrator has enabled the permissions role "Denied" + And user "Alice" has created folder "FolderToShare" + And user "Alice" has uploaded file with content "personal space" to "/textfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Denied | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And user "Brian" should not have a share "" shared by user "Alice" + Examples: + | resource | + | FolderToShare | + | textfile.txt | + + @env-config + Scenario Outline: check the response while sharing a resource with denied permission role (Project Space) + Given using spaces DAV path + And the administrator has enabled the permissions role "Denied" + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "NewSpace" with the default quota using the Graph API + And user "Alice" has created a folder "FolderToShare" in space "NewSpace" + And user "Alice" has uploaded a file inside space "NewSpace" with content "project space" to "textfile.txt" + And user "Alice" has sent the following resource share invitation: + | resource | | + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | Denied | + When user "Brian" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And user "Brian" should not have a share "" shared by user "Alice" + Examples: + | resource | + | FolderToShare | + | textfile.txt |