From 66f4204b09dfd473935aadcd1001bca15a7c17d9 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Tue, 3 Dec 2024 17:30:01 +0545 Subject: [PATCH 1/3] test: update issue tags --- .../acceptance/features/apiOcm/searchFederationUsers.feature | 4 ++-- .../features/coreApiWebdavProperties/createFileFolder.feature | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/features/apiOcm/searchFederationUsers.feature b/tests/acceptance/features/apiOcm/searchFederationUsers.feature index 08caa95c8da..fc461a76619 100755 --- a/tests/acceptance/features/apiOcm/searchFederationUsers.feature +++ b/tests/acceptance/features/apiOcm/searchFederationUsers.feature @@ -12,7 +12,7 @@ Feature: search federation users And using server "REMOTE" And user "Brian" has been created with default attributes - + @issue-9813 Scenario: users search for federation users by display name Given using server "LOCAL" And "Alice" has created the federation share invitation @@ -142,7 +142,7 @@ Feature: search federation users } """ - + @issue-9813 Scenario: user search for federation users by email Given using server "LOCAL" And "Alice" has created the federation share invitation diff --git a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature index 98dd4ed6979..63b13b7ff94 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature @@ -165,7 +165,7 @@ Feature: create files and folder | spaces | "'single'.txt" | | spaces | '"double".txt' | - @issue-10339 + @issue-10339 @issue-9568 Scenario Outline: try to create file with '.', '..' and 'empty' Given using DAV path When user "Alice" uploads file with content "some text" to "" using the WebDAV API @@ -185,7 +185,7 @@ Feature: create files and folder | spaces | /../lorem | 400 | | spaces | | 400 | - @issue-10339 + @issue-10339 @issue-9568 Scenario Outline: try to create folder with '.', '..' and 'empty' Given using DAV path When user "Alice" creates folder "" using the WebDAV API From c6859cc9fb295def9bb62b250a992147e3524c3b Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 4 Dec 2024 15:15:27 +0545 Subject: [PATCH 2/3] test: check etag --- .../acceptance/features/apiOcm/share.feature | 47 +++++++++++++++---- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/features/apiOcm/share.feature b/tests/acceptance/features/apiOcm/share.feature index 74cfcd02574..b7f2a28ae40 100755 --- a/tests/acceptance/features/apiOcm/share.feature +++ b/tests/acceptance/features/apiOcm/share.feature @@ -45,7 +45,9 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name" + "name", + "eTag", + "remoteItem" ], "properties": { "@UI.Hidden": { @@ -87,6 +89,10 @@ Feature: an user shares resources using ScienceMesh application }, "name": { "const": "" + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" } } } @@ -136,7 +142,9 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name" + "name", + "eTag", + "remoteItem" ], "properties": { "@UI.Hidden": { @@ -166,6 +174,10 @@ Feature: an user shares resources using ScienceMesh application }, "name": { "const": "folderToShare" + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" } } } @@ -210,7 +222,9 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name" + "name", + "eTag", + "remoteItem" ], "properties": { "@UI.Hidden": { @@ -251,6 +265,10 @@ Feature: an user shares resources using ScienceMesh application }, "name": { "const": "" + }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" } } } @@ -399,6 +417,8 @@ Feature: an user shares resources using ScienceMesh application "parentReference", "permissions", "name", + "eTag", + "file", "size" ], "properties": { @@ -489,6 +509,19 @@ Feature: an user shares resources using ScienceMesh application "name": { "const": "textfile.txt" }, + "eTag": { + "type": "string", + "pattern": "%etag_pattern%" + }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { + "const": "text/plain" + } + } + }, "size": { "const": 8 } @@ -691,9 +724,7 @@ Feature: an user shares resources using ScienceMesh application }, "file": { "type": "object", - "required": [ - "mimeType" - ], + "required": ["mimeType"], "properties": { "mimeType": { "const": "image/jpeg" @@ -715,9 +746,7 @@ Feature: an user shares resources using ScienceMesh application "properties": { "file": { "type": "object", - "required": [ - "mimeType" - ], + "required": ["mimeType"], "properties": { "mimeType": { "const": "image/jpeg" From ad2e310ec30700ee0b01f709cc14efb1a58e7e40 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Mon, 9 Dec 2024 15:08:22 +0545 Subject: [PATCH 3/3] tests: more checks --- tests/acceptance/TestHelpers/GraphHelper.php | 9 +- tests/acceptance/bootstrap/FeatureContext.php | 8 + .../acceptance/features/apiOcm/share.feature | 592 +++++++++++++----- 3 files changed, 457 insertions(+), 152 deletions(-) diff --git a/tests/acceptance/TestHelpers/GraphHelper.php b/tests/acceptance/TestHelpers/GraphHelper.php index 5b2b056a2b2..ce300dfe837 100644 --- a/tests/acceptance/TestHelpers/GraphHelper.php +++ b/tests/acceptance/TestHelpers/GraphHelper.php @@ -126,7 +126,14 @@ public static function getEtagRegex(): string { * @return string */ public static function getFederatedUserRegex(): string { - return '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'; + return '(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$'; + } + + /** + * @return string + */ + public static function getFederatedFileIdRegex(): string { + return self::getSpaceIdRegex() . '!(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}'; } /** diff --git a/tests/acceptance/bootstrap/FeatureContext.php b/tests/acceptance/bootstrap/FeatureContext.php index 80b345a3ccc..1b11fe8d34b 100644 --- a/tests/acceptance/bootstrap/FeatureContext.php +++ b/tests/acceptance/bootstrap/FeatureContext.php @@ -2339,6 +2339,14 @@ public function substituteInLineCodes( ], "parameter" => [] ], + [ + "code" => "%federated_file_id_pattern%", + "function" => [ + __NAMESPACE__ . '\TestHelpers\GraphHelper', + "getFederatedFileIdRegex" + ], + "parameter" => [] + ], [ "code" => "%group_id_pattern%", "function" => [ diff --git a/tests/acceptance/features/apiOcm/share.feature b/tests/acceptance/features/apiOcm/share.feature index b7f2a28ae40..9fd1e0db627 100755 --- a/tests/acceptance/features/apiOcm/share.feature +++ b/tests/acceptance/features/apiOcm/share.feature @@ -9,20 +9,19 @@ Feature: an user shares resources using ScienceMesh application And user "Brian" has been created with default attributes @issue-9534 - Scenario Outline: local user shares resources to federation user + Scenario: local user shares a folder to federation user Given using server "LOCAL" And "Alice" has created the federation share invitation And using server "REMOTE" And "Brian" has accepted invitation And using server "LOCAL" And user "Alice" has created folder "folderToShare" - And user "Alice" has uploaded file with content "ocm test" to "/textfile.txt" When user "Alice" sends the following resource share invitation to federated user using the Graph API: - | resource | | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | Then the HTTP status code should be "200" When using server "REMOTE" And user "Brian" lists the shares shared with him without retry using the Graph API @@ -31,9 +30,7 @@ Feature: an user shares resources using ScienceMesh application """ { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "value": { "type": "array", @@ -45,54 +42,139 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name", "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", "remoteItem" ], "properties": { - "@UI.Hidden": { - "type": "boolean", - "enum": [ - false - ] + "@UI.Hidden": { "const": false }, + "@client.synchronize": { "const": false }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } }, - "@client.synchronize": { - "type": "boolean", - "enum": [ - false - ] + "eTag": { "pattern": "%etag_pattern%" }, + "folder": { "const": {} }, + "id": { "pattern": "^%file_id_pattern%$" }, + "name": { "const": "folderToShare" }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType", "id"], + "properties": { + "driveId": { "pattern": "^%space_id_pattern%$" }, + "driveType": { "const": "virtual" }, + "id": { "pattern": "^%file_id_pattern%$" } + } }, - "createdBy": { + "remoteItem": { "type": "object", "required": [ - "user" + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "permissions" ], "properties": { - "user": { + "createdBy": { "type": "object", - "required": [ - "displayName", - "id" - ], + "required": ["user"], "properties": { - "displayName": { - "type": "string", - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%federated_user_id_pattern%$" + "user": { + "type": "object", + "required": ["id", "displayName", "@libre.graph.userType"], + "properties": { + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "displayName": { "const": "Alice Hansen" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + }, + "eTag": { "pattern": "%etag_pattern%" }, + "folder": { "const": {} }, + "id": { "pattern": "^%federated_file_id_pattern%$" }, + "name": { "const": "folderToShare" }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "createdDateTime", + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Brian Murphy" }, + "id": { "pattern": "^%user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Member" } + } + } + } + }, + "id": { "pattern": "^%uuidv4_pattern%$" }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "pattern": "^%role_id_pattern%$" + } + } } } } } - }, - "name": { - "const": "" - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" } } } @@ -100,28 +182,21 @@ Feature: an user shares resources using ScienceMesh application } } """ - Examples: - | resource | - | folderToShare | - | textfile.txt | - - Scenario: local user shares resources from project space to federation user + @issue-9534 + Scenario: local user shares a file to federation user Given using server "LOCAL" And "Alice" has created the federation share invitation And using server "REMOTE" And "Brian" has accepted invitation And using server "LOCAL" - And using spaces DAV path - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "projectSpace" with the default quota using the Graph API - And user "Alice" has created a folder "folderToShare" in space "projectSpace" + And user "Alice" has uploaded file with content "ocm test" to "textfile.txt" When user "Alice" sends the following resource share invitation to federated user using the Graph API: - | resource | folderToShare | - | space | projectSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | Then the HTTP status code should be "200" When using server "REMOTE" And user "Brian" lists the shares shared with him without retry using the Graph API @@ -130,7 +205,7 @@ Feature: an user shares resources using ScienceMesh application """ { "type": "object", - "required": [ "value" ], + "required": ["value"], "properties": { "value": { "type": "array", @@ -142,42 +217,151 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name", "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "parentReference", "remoteItem" ], "properties": { - "@UI.Hidden": { - "const": false - }, - "@client.synchronize": { - "const": false - }, + "@UI.Hidden": { "const": false }, + "@client.synchronize": { "const": false }, "createdBy": { "type": "object", - "required": [ "user" ], + "required": ["user"], "properties": { "user": { "type": "object", - "required": [ "displayName", "id" ], + "required": ["displayName", "id", "@libre.graph.userType"], "properties": { - "displayName": { - "const": "Alice Hansen" - }, - "id": { - "type": "string", - "pattern": "^%federated_user_id_pattern%$" - } + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } } } } }, - "name": { - "const": "folderToShare" + "eTag": { "pattern": "%etag_pattern%" }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { "const": "text/plain" } + } }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" + "id": { "pattern": "^%file_id_pattern%$" }, + "name": { "const": "textfile.txt" }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType", "id"], + "properties": { + "driveId": { "pattern": "^%space_id_pattern%$" }, + "driveType": { "const": "virtual" }, + "id": { "pattern": "^%file_id_pattern%$" } + } + }, + "remoteItem": { + "type": "object", + "required": [ + "createdBy", + "eTag", + "file", + "id", + "lastModifiedDateTime", + "name", + "permissions" + ], + "properties": { + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["id", "displayName", "@libre.graph.userType"], + "properties": { + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "displayName": { "const": "Alice Hansen" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + }, + "eTag": { "pattern": "%etag_pattern%" }, + "file": { + "type": "object", + "required": ["mimeType"], + "properties": { + "mimeType": { "const": "text/plain" } + } + }, + "id": { "pattern": "^%federated_file_id_pattern%$" }, + "name": { "const": "textfile.txt" }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "createdDateTime", + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Brian Murphy" }, + "id": { "pattern": "^%user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Member" } + } + } + } + }, + "id": { "pattern": "^%uuidv4_pattern%$" }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "pattern": "^%role_id_pattern%$" + } + } + } + } + } + } } } } @@ -186,31 +370,32 @@ Feature: an user shares resources using ScienceMesh application } """ - @issue-9534 - Scenario Outline: federation user shares resource to local user after accepting invitation + + Scenario: local user shares a folder from project space to federation user Given using server "LOCAL" And "Alice" has created the federation share invitation And using server "REMOTE" And "Brian" has accepted invitation - And user "Brian" has created folder "folderToShare" - And user "Brian" has uploaded file with content "ocm test" to "/textfile.txt" - When user "Brian" sends the following resource share invitation to federated user using the Graph API: - | resource | | - | space | Personal | - | sharee | Alice | - | shareType | user | - | permissionsRole | Viewer | + And using server "LOCAL" + And using spaces DAV path + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "projectSpace" with the default quota using the Graph API + And user "Alice" has created a folder "folderToShare" in space "projectSpace" + When user "Alice" sends the following resource share invitation to federated user using the Graph API: + | resource | folderToShare | + | space | projectSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | Then the HTTP status code should be "200" - When using server "LOCAL" - And user "Alice" lists the shares shared with her without retry using the Graph API + When using server "REMOTE" + And user "Brian" lists the shares shared with him without retry using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match """ { "type": "object", - "required": [ - "value" - ], + "required": ["value"], "properties": { "value": { "type": "array", @@ -222,53 +407,139 @@ Feature: an user shares resources using ScienceMesh application "@UI.Hidden", "@client.synchronize", "createdBy", - "name", "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "parentReference", "remoteItem" ], "properties": { - "@UI.Hidden": { - "type": "boolean", - "enum": [ - false - ] + "@UI.Hidden": { "const": false }, + "@client.synchronize": { "const": false }, + "createdBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } }, - "@client.synchronize": { - "type": "boolean", - "enum": [ - false - ] + "eTag": { "pattern": "%etag_pattern%" }, + "folder": { "const": {} }, + "id": { "pattern": "^%file_id_pattern%$" }, + "name": { "const": "folderToShare" }, + "parentReference": { + "type": "object", + "required": ["driveId", "driveType", "id"], + "properties": { + "driveId": { "pattern": "^%space_id_pattern%$" }, + "driveType": { "const": "virtual" }, + "id": { "pattern": "^%file_id_pattern%$" } + } }, - "createdBy": { + "remoteItem": { "type": "object", "required": [ - "user" + "createdBy", + "eTag", + "folder", + "id", + "lastModifiedDateTime", + "name", + "permissions" ], "properties": { - "user": { + "createdBy": { "type": "object", - "required": [ - "displayName", - "id" - ], + "required": ["user"], "properties": { - "displayName": { - "const": "Brian Murphy" - }, - "id": { - "type": "string", - "pattern": "^%federated_user_id_pattern%$" + "user": { + "type": "object", + "required": ["id", "displayName", "@libre.graph.userType"], + "properties": { + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "displayName": { "const": "Alice Hansen" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + }, + "eTag": { "pattern": "%etag_pattern%" }, + "folder": { "const": {} }, + "id": { "pattern": "^%federated_file_id_pattern%$" }, + "name": { "const": "folderToShare" }, + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "createdDateTime", + "grantedToV2", + "id", + "invitation", + "roles" + ], + "properties": { + "grantedToV2": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Brian Murphy" }, + "id": { "pattern": "^%user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Member" } + } + } + } + }, + "id": { "pattern": "^%uuidv4_pattern%$" }, + "invitation": { + "type": "object", + "required": ["invitedBy"], + "properties": { + "invitedBy": { + "type": "object", + "required": ["user"], + "properties": { + "user": { + "type": "object", + "required": ["displayName", "id", "@libre.graph.userType"], + "properties": { + "displayName": { "const": "Alice Hansen" }, + "id": { "pattern": "^%federated_user_id_pattern%$" }, + "@libre.graph.userType": { "const": "Federated" } + } + } + } + } + } + }, + "roles": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "pattern": "^%role_id_pattern%$" + } + } } } } } - }, - "name": { - "const": "" - }, - "eTag": { - "type": "string", - "pattern": "%etag_pattern%" } } } @@ -276,10 +547,6 @@ Feature: an user shares resources using ScienceMesh application } } """ - Examples: - | resource | - | folderToShare | - | textfile.txt | @issue-10051 Scenario Outline: try to add federated user as a member of a project space (permissions endpoint) @@ -845,25 +1112,25 @@ Feature: an user shares resources using ScienceMesh application And for user "Alice" the content of the file "textfile.txt" of the space "Personal" should be "this is a new content" @issue-10488 - Scenario Outline: local user shares a folder copied from an already shared folder to federation user + Scenario: local user shares a folder copied from an already shared folder to federation user Given using server "REMOTE" And "Brian" has created the federation share invitation And using server "LOCAL" And "Alice" has accepted invitation And user "Alice" has created folder "folderToShare" And user "Alice" has sent the following resource share invitation to federated user: - | resource | folderToShare | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | + | resource | folderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has copied folder "folderToShare" to "folderToShareCopy" And user "Alice" has sent the following resource share invitation to federated user: - | resource | folderToShareCopy | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | | + | resource | folderToShareCopy | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | And using server "REMOTE" When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" @@ -899,6 +1166,21 @@ Feature: an user shares resources using ScienceMesh application "properties": { "name": { "const": "folderToShare" + }, + "remoteItem": { + "type": "object", + "required": ["permissions"], + "properties": { + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": ["@libre.graph.permissions.actions"] + } + } + } } } }, @@ -919,6 +1201,25 @@ Feature: an user shares resources using ScienceMesh application "properties": { "name": { "const": "folderToShareCopy" + }, + "remoteItem": { + "type": "object", + "required": ["permissions"], + "properties": { + "permissions": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "@libre.graph.permissions.actions": { + "type": "null" + } + } + } + } + } } } } @@ -928,14 +1229,3 @@ Feature: an user shares resources using ScienceMesh application } } """ - Examples: - | permissions-role-1 | permissions-role-2 | - | Editor | Viewer | - | Editor | Uploader | - | Editor | Editor | - | Uploader | Editor | - | Uploader | Viewer | - | Uploader | Uploader | - | Viewer | Uploader | - | Viewer | Editor | - | Viewer | Viewer |