From 9da0f1e0c443019ca6dfeef9e49ef565a33b23d0 Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Wed, 8 Jan 2025 12:22:14 +0545 Subject: [PATCH] add tests to try creating public link share with denied role Signed-off-by: prashant-gurung899 --- .../createLinkShare.feature | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature index 8415a4c89c..09fb07f6f7 100644 --- a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature +++ b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature @@ -2764,3 +2764,40 @@ Feature: Create a link share for a resource | Space Viewer | | Space Editor | | Manager | + + @env-config + Scenario: try to create a public link share of a folder with denied permissions role + Given using spaces DAV path + And the administrator has enabled the permissions role "Denied" + And user "Alice" has created folder "FolderToShare" + When user "Alice" creates the following resource link share using the Graph API: + | resource | FolderToShare | + | space | Personal | + | permissionsRole | denied | + | password | %public% | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": [ "code", "innererror", "message" ], + "properties": { + "code": { + "const": "invalidRequest" + }, + "innererror": { + "type": "object", + "required": [ "date", "request-id" ] + }, + "message": { + "const": "invalid body schema definition" + } + } + } + } + } + """