From a527760f2029cc157eadabc5e146eb75aada45e5 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 13 Jun 2019 19:23:39 +0545 Subject: [PATCH 1/2] Add test steps for upload download of files in public share --- .../bootstrap/PublicWebDavContext.php | 112 +++++++++++++++--- 1 file changed, 93 insertions(+), 19 deletions(-) diff --git a/tests/acceptance/features/bootstrap/PublicWebDavContext.php b/tests/acceptance/features/bootstrap/PublicWebDavContext.php index 186ad3923f37..e019f1351204 100644 --- a/tests/acceptance/features/bootstrap/PublicWebDavContext.php +++ b/tests/acceptance/features/bootstrap/PublicWebDavContext.php @@ -106,6 +106,35 @@ public function renameFileFromPublicShare($fileName, $toFileName) { ); } + /** + * @When /^the public downloads file "([^"]*)" from inside the last public shared folder using the public WebDAV API$/ + * + * @param string $path + * + * @return void + */ + public function downloadPublicFileInsideAFolder($path) { + $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPasswordAndRange( + $path, "", "" + ); + } + + /** + * @When /^the public downloads file "([^"]*)" from inside the last public shared folder with password "([^"]*)" using the public WebDAV API$/ + * + * @param string $path + * @param string $password + * + * @return void + */ + public function publicDownloadsTheFileInsideThePublicSharedFolderWithPassword( + $path, $password = "" + ) { + $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPasswordAndRange( + $path, $password, "" + ); + } + /** * @When /^the public downloads file "([^"]*)" from inside the last public shared folder with range "([^"]*)" using the public WebDAV API$/ * @@ -115,17 +144,9 @@ public function renameFileFromPublicShare($fileName, $toFileName) { * @return void */ public function downloadPublicFileInsideAFolderWithRange($path, $range) { - $path = \ltrim($path, "/"); - $fullUrl = $this->featureContext->getBaseUrl() . "/public.php/webdav/$path"; - $headers = [ - 'X-Requested-With' => 'XMLHttpRequest', - 'Range' => $range - ]; - $response = HttpRequestHelper::get( - $fullUrl, $this->featureContext->getLastShareData()->data->token, - "", $headers + $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPasswordAndRange( + $path, "", $range ); - $this->featureContext->setResponse($response); } /** @@ -137,16 +158,18 @@ public function downloadPublicFileInsideAFolderWithRange($path, $range) { * * @return void */ - public function publicDownloadsTheFileInsideThePublicSharedFolderWithPassword( + public function publicDownloadsTheFileInsideThePublicSharedFolderWithPasswordAndRange( $path, $password, $range ) { $path = \ltrim($path, "/"); $password = $this->featureContext->getActualPassword($password); $fullUrl = $this->featureContext->getBaseUrl() . "/public.php/webdav/$path"; $headers = [ - 'X-Requested-With' => 'XMLHttpRequest', - 'Range' => $range + 'X-Requested-With' => 'XMLHttpRequest' ]; + if ($range !== "") { + $headers['Range'] = $range; + } $response = HttpRequestHelper::get( $fullUrl, $this->featureContext->getLastShareData()->data->token, $password, $headers @@ -222,6 +245,39 @@ public function publiclyUploadingContent($filename, $body = 'test') { $this->publicUploadContent($filename, '', $body); } + /** + * @Then /^the public should be able to download file "([^"]*)" from inside the last public shared folder and the content should be "([^"]*)"$/ + * + * @param string $path + * @param string $content + * + * @return void + */ + public function shouldBeAbleToDownloadFileInsidePublicSharedFolder( + $path, $content + ) { + $this->shouldBeAbleToDownloadRangeOfFileInsidePublicSharedFolderWithPassword( + "", $path, "", $content + ); + } + + /** + * @Then /^the public should be able to download file "([^"]*)" from inside the last public shared folder with password "([^"]*)" and the content should be "([^"]*)"$/ + * + * @param string $path + * @param string $password + * @param string $content + * + * @return void + */ + public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPassword( + $path, $password, $content + ) { + $this->shouldBeAbleToDownloadRangeOfFileInsidePublicSharedFolderWithPassword( + "", $path, $password, $content + ); + } + /** * @Then /^the public should be able to download the range "([^"]*)" of file "([^"]*)" from inside the last public shared folder with password "([^"]*)" and the content should be "([^"]*)"$/ * @@ -232,10 +288,10 @@ public function publiclyUploadingContent($filename, $body = 'test') { * * @return void */ - public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPassword( + public function shouldBeAbleToDownloadRangeOfFileInsidePublicSharedFolderWithPassword( $range, $path, $password, $content ) { - $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPassword( + $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPasswordAndRange( $path, $password, $range ); $this->featureContext->downloadedContentShouldBe($content); @@ -250,12 +306,30 @@ public function shouldBeAbleToDownloadFileInsidePublicSharedFolderWithPassword( * * @return void */ - public function shouldBeAbleToDownloadFileInsidePublicSharedFolder( + public function shouldBeAbleToDownloadRangeOfFileInsidePublicSharedFolder( $range, $path, $content ) { - $this->publicDownloadsTheFileInsideThePublicSharedFolderWithPassword( - $path, null, $range + $this->shouldBeAbleToDownloadRangeOfFileInsidePublicSharedFolderWithPassword( + $range, $path, "", $content + ); + } + + /** + * @Then /^the public should be able to upload file "([^"]*)" with content "([^"]*)" to the last public shared folder$/ + * + * @param string $path + * @param string $content + * + * @return void + */ + public function shouldBeAbleToUploadFileWithContentToTheLastPublicSharedFolder( + $path, $content + ) { + $this->publiclyUploadingContent($path, $content); + $this->featureContext->theHTTPStatusCodeShouldBe( + "201", "Failed to upload file to public share" ); + $this->downloadPublicFileInsideAFolder($path); $this->featureContext->downloadedContentShouldBe($content); } @@ -294,7 +368,7 @@ public function publiclyUploadingShouldWork() { $response->getStatusCode() ); $this->shouldBeAbleToDownloadFileInsidePublicSharedFolder( - "bytes=0-3", $path, $content + $path, $content ); } From 43dcdd140c8efddc4ccc99e06d07779e6451057f Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 13 Jun 2019 19:24:08 +0545 Subject: [PATCH 2/2] Enhance reShare acceptance test scenarios --- .../apiShareManagement/reShare.feature | 402 ++++++++++++++++-- 1 file changed, 368 insertions(+), 34 deletions(-) diff --git a/tests/acceptance/features/apiShareManagement/reShare.feature b/tests/acceptance/features/apiShareManagement/reShare.feature index 508d5f5f5951..43ff254c3170 100644 --- a/tests/acceptance/features/apiShareManagement/reShare.feature +++ b/tests/acceptance/features/apiShareManagement/reShare.feature @@ -3,67 +3,162 @@ Feature: sharing Background: Given using old DAV path - And these users have been created with default attributes and skeleton files: - | username | - | user0 | - | user1 | + And user "user0" has been created with default attributes and skeleton files + And user "user1" has been created with default attributes and without skeleton files Scenario Outline: User is not allowed to reshare file Given using OCS API version "" - And user "user2" has been created with default attributes and skeleton files + And user "user2" has been created with default attributes and without skeleton files And user "user0" has created a share with settings | path | /textfile0.txt | | shareType | 0 | | shareWith | user1 | - | permissions | 8 | + | permissions | 15 | When user "user1" creates a share using the sharing API with settings - | path | /textfile0 (2).txt | - | shareType | 0 | - | shareWith | user2 | - | permissions | 31 | + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user2 | + | permissions | 15 | Then the OCS status code should be "404" And the HTTP status code should be "" + And as "user2" file "/textfile0.txt" should not exist + But as "user1" file "/textfile0.txt" should exist Examples: | ocs_api_version | http_status_code | | 1 | 200 | | 2 | 404 | + Scenario Outline: User is allowed to reshare file with the same permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created a share with settings + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user1 | + | permissions | 17 | + When user "user1" creates a share using the sharing API with settings + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user2 | + | permissions | 17 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And as "user2" file "/textfile0.txt" should exist + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + Scenario Outline: User is allowed to reshare file with less permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created a share with settings + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user1 | + | permissions | 31 | + When user "user1" creates a share using the sharing API with settings + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user2 | + | permissions | 17 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And as "user2" file "/textfile0.txt" should exist + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + Scenario Outline: User is not allowed to reshare file with more permissions Given using OCS API version "" - And user "user2" has been created with default attributes and skeleton files + And user "user2" has been created with default attributes and without skeleton files And user "user0" has created a share with settings | path | /textfile0.txt | | shareType | 0 | | shareWith | user1 | - | permissions | 16 | + | permissions | 17 | When user "user1" creates a share using the sharing API with settings - | path | /textfile0 (2).txt | - | shareType | 0 | - | shareWith | user2 | - | permissions | 31 | + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user2 | + | permissions | 31 | + Then the OCS status code should be "404" + And the HTTP status code should be "" + And as "user2" file "/textfile0.txt" should not exist + But as "user1" file "/textfile0.txt" should exist + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + + Scenario Outline: Update of reshare can reduce permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 23 | + And user "user1" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user2 | + | permissions | 23 | + When user "user1" updates the last share using the sharing API with + | permissions | 17 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @issue-35528 + Scenario Outline: Update of reshare can increase permissions to the maximum allowed + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 23 | + And user "user1" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user2 | + | permissions | 17 | + When user "user1" updates the last share using the sharing API with + | permissions | 23 | Then the OCS status code should be "404" And the HTTP status code should be "" + #Then the OCS status code should be "" + #And the HTTP status code should be "200" Examples: | ocs_api_version | http_status_code | | 1 | 200 | | 2 | 404 | + #| ocs_api_version | ocs_status_code | + #| 1 | 100 | + #| 2 | 200 | - Scenario Outline: Do not allow reshare to exceed permissions + Scenario Outline: Do not allow update of reshare to exceed permissions Given using OCS API version "" - And user "user2" has been created with default attributes and skeleton files + And user "user2" has been created with default attributes and without skeleton files And user "user0" has created folder "/TMP" And user "user0" has created a share with settings | path | /TMP | | shareType | 0 | | shareWith | user1 | | permissions | 21 | - And as user "user1" - And the user has created a share with settings + And user "user1" has created a share with settings | path | /TMP | | shareType | 0 | | shareWith | user2 | | permissions | 21 | - When the user updates the last share using the sharing API with + When user "user1" updates the last share using the sharing API with | permissions | 31 | Then the OCS status code should be "404" And the HTTP status code should be "" @@ -72,19 +167,134 @@ Feature: sharing | 1 | 200 | | 2 | 404 | + Scenario Outline: User is allowed to reshare a sub-folder with the same permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created folder "/TMP/SUB" + And user "user0" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 17 | + When user "user1" creates a share using the sharing API with settings + | path | /TMP/SUB | + | shareType | 0 | + | shareWith | user2 | + | permissions | 17 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And as "user2" folder "/SUB" should exist + And as "user1" file "/TMP/SUB" should exist + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + Scenario Outline: User is not allowed to reshare a sub-folder with more permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created folder "/TMP/SUB" + And user "user0" has created a share with settings + | path | /TMP | + | shareType | 0 | + | shareWith | user1 | + | permissions | 17 | + When user "user1" creates a share using the sharing API with settings + | path | /TMP/SUB | + | shareType | 0 | + | shareWith | user2 | + | permissions | 31 | + Then the OCS status code should be "404" + And the HTTP status code should be "" + And as "user2" folder "/SUB" should not exist + But as "user1" file "/TMP/SUB" should exist + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + + Scenario Outline: User is allowed to update reshare of a sub-folder with less permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created folder "/TMP/SUB" + And user "user0" has shared folder "/TMP" with user "user1" with permissions 23 + And user "user1" has shared folder "/TMP/SUB" with user "user2" with permissions 23 + When user "user1" updates the last share using the sharing API with + | permissions | 17 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And as "user2" folder "/SUB" should exist + But user "user2" should not be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt" + And as "user1" file "/TMP/SUB" should exist + And user "user1" should be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt" + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @issue-35528 + Scenario Outline: User is allowed to update reshare of a sub-folder to the maximum allowed permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created folder "/TMP/SUB" + And user "user0" has shared folder "/TMP" with user "user1" with permissions 23 + And user "user1" has shared folder "/TMP/SUB" with user "user2" with permissions 17 + When user "user1" updates the last share using the sharing API with + | permissions | 23 | + Then the OCS status code should be "404" + And the HTTP status code should be "" + #Then the OCS status code should be "" + #And the HTTP status code should be "200" + And as "user2" folder "/SUB" should exist + And user "user2" should not be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt" + #And user "user2" should be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt" + And as "user1" file "/TMP/SUB" should exist + And user "user1" should be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt" + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + #| ocs_api_version | ocs_status_code | + #| 1 | 100 | + #| 2 | 200 | + + Scenario Outline: User is not allowed to update reshare of a sub-folder with more permissions + Given using OCS API version "" + And user "user2" has been created with default attributes and without skeleton files + And user "user0" has created folder "/TMP" + And user "user0" has created folder "/TMP/SUB" + And user "user0" has shared folder "/TMP" with user "user1" with permissions 17 + And user "user1" has shared folder "/TMP/SUB" with user "user2" with permissions 17 + When user "user1" updates the last share using the sharing API with + | permissions | 31 | + Then the OCS status code should be "404" + And the HTTP status code should be "" + And as "user2" folder "/SUB" should exist + But user "user2" should not be able to upload file "filesForUpload/textfile.txt" to "/SUB/textfile.txt" + And as "user1" file "/TMP/SUB" should exist + But user "user1" should not be able to upload file "filesForUpload/textfile.txt" to "/TMP/SUB/textfile.txt" + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + Scenario: Reshared files can be still accessed if a user in the middle removes it. - Given user "user2" has been created with default attributes and skeleton files - And user "user3" has been created with default attributes and skeleton files + Given user "user2" has been created with default attributes and without skeleton files + And user "user3" has been created with default attributes and without skeleton files And user "user0" has shared file "textfile0.txt" with user "user1" - And user "user1" has moved file "/textfile0 (2).txt" to "/textfile0_shared.txt" + And user "user1" has moved file "/textfile0.txt" to "/textfile0_shared.txt" And user "user1" has shared file "textfile0_shared.txt" with user "user2" And user "user2" has shared file "textfile0_shared.txt" with user "user3" When user "user1" deletes file "/textfile0_shared.txt" using the WebDAV API - And user "user3" downloads file "/textfile0_shared.txt" with range "bytes=1-7" using the WebDAV API - Then the downloaded content should be "wnCloud" + Then the content of file "/textfile0_shared.txt" for user "user2" should be "ownCloud test text file 0" plus end-of-line + Then the content of file "/textfile0_shared.txt" for user "user3" should be "ownCloud test text file 0" plus end-of-line @public_link_share-feature-required - Scenario Outline: resharing using a public link with read only permissions is not allowed + Scenario Outline: creating a public link from a share with read permission only is not allowed Given using OCS API version "" And user "user0" has created folder "/test" And user "user0" has shared folder "/test" with user "user1" with permissions 1 @@ -99,13 +309,101 @@ Feature: sharing | 2 | 404 | @public_link_share-feature-required - Scenario Outline: resharing using a public link with read and write permissions only is not allowed + Scenario Outline: creating a public link from a share with share+read only permissions is allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has uploaded file with content "some content" to "/test/file.txt" + And user "user0" has shared folder "/test" with user "user1" with permissions 17 + When user "user1" creates a public link share using the sharing API with settings + | path | /test | + | publicUpload | false | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the public should be able to download file "file.txt" from inside the last public shared folder and the content should be "some content" + But publicly uploading a file should not work + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @public_link_share-feature-required + Scenario Outline: creating an upload public link from a share with share+read only permissions is not allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has shared folder "/test" with user "user1" with permissions 17 + When user "user1" creates a public link share using the sharing API with settings + | path | /test | + | permissions | 15 | + | publicUpload | true | + Then the OCS status code should be "404" + And the HTTP status code should be "" + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + + @public_link_share-feature-required + Scenario Outline: creating a public link from a share with read+write permissions only is not allowed Given using OCS API version "" And user "user0" has created folder "/test" And user "user0" has shared folder "/test" with user "user1" with permissions 15 + When user "user1" creates a public link share using the sharing API with settings + | path | /test | + | publicUpload | true | + Then the OCS status code should be "404" + And the HTTP status code should be "" + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + + @public_link_share-feature-required + Scenario Outline: creating a public link from a share with share+read+write permissions is allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has uploaded file with content "some content" to "/test/file.txt" + And user "user0" has shared folder "/test" with user "user1" with permissions 31 When user "user1" creates a public link share using the sharing API with settings | path | /test | | publicUpload | false | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the public should be able to download file "file.txt" from inside the last public shared folder and the content should be "some content" + But publicly uploading a file should not work + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @public_link_share-feature-required + Scenario Outline: creating an upload public link from a share with share+read+write permissions is allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has uploaded file with content "some content" to "/test/file.txt" + And user "user0" has shared folder "/test" with user "user1" with permissions 31 + When user "user1" creates a public link share using the sharing API with settings + | path | /test | + | permissions | 15 | + | publicUpload | true | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And the public should be able to download file "file.txt" from inside the last public shared folder and the content should be "some content" + And publicly uploading a file should work + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | + + @public_link_share-feature-required + Scenario Outline: creating an upload public link from a sub-folder of a share with share+read only permissions is not allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has created folder "/test/sub" + And user "user0" has shared folder "/test" with user "user1" with permissions 17 + When user "user1" creates a public link share using the sharing API with settings + | path | /test/sub | + | permissions | 15 | + | publicUpload | true | Then the OCS status code should be "404" And the HTTP status code should be "" Examples: @@ -113,9 +411,29 @@ Feature: sharing | 1 | 200 | | 2 | 404 | + @public_link_share-feature-required + Scenario Outline: increasing permissions of a public link of a share with share+read only permissions is not allowed + Given using OCS API version "" + And user "user0" has created folder "/test" + And user "user0" has created folder "/test/sub" + And user "user0" has shared folder "/test" with user "user1" with permissions 17 + And user "user1" has created a public link share with settings + | path | /test | + | permissions | 1 | + | publicUpload | false | + When user "user1" updates the last share using the sharing API with + | permissions | 15 | + Then the OCS status code should be "404" + And the HTTP status code should be "" + And publicly uploading a file should not work + Examples: + | ocs_api_version | http_status_code | + | 1 | 200 | + | 2 | 404 | + Scenario Outline: resharing a file is not allowed when allow resharing has been disabled Given using OCS API version "" - And user "user2" has been created with default attributes and skeleton files + And user "user2" has been created with default attributes and without skeleton files And user "user0" has created a share with settings | path | /textfile0.txt | | shareType | 0 | @@ -123,14 +441,30 @@ Feature: sharing | permissions | 31 | And parameter "shareapi_allow_resharing" of app "core" has been set to "no" When user "user1" creates a share using the sharing API with settings - | path | /textfile0 (2).txt | - | shareType | 0 | - | shareWith | user2 | - | permissions | 31 | + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user2 | + | permissions | 31 | Then the OCS status code should be "404" And the HTTP status code should be "" - And as "user2" file "/textfile0 (2).txt" should not exist + And as "user2" file "/textfile0.txt" should not exist Examples: | ocs_api_version | http_status_code | | 1 | 200 | | 2 | 404 | + + Scenario Outline: ordinary sharing is allowed when allow resharing has been disabled + Given using OCS API version "" + And parameter "shareapi_allow_resharing" of app "core" has been set to "no" + When user "user0" creates a share using the sharing API with settings + | path | /textfile0.txt | + | shareType | 0 | + | shareWith | user1 | + | permissions | 31 | + Then the OCS status code should be "" + And the HTTP status code should be "200" + And as "user1" file "/textfile0.txt" should exist + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 |