mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-28 07:29:25 -06:00
Merge pull request #9202 from owncloud/use-sharingNG-in-given-steps-coreApiSharePublicLink2
[full-ci] [tests-only] Use sharing-ng in given steps for sharing
This commit is contained in:
@@ -152,6 +152,7 @@ default:
|
||||
- TrashbinContext:
|
||||
- WebDavPropertiesContext:
|
||||
- OcisConfigContext:
|
||||
- SharingNgContext:
|
||||
|
||||
coreApiShareUpdateToShares:
|
||||
paths:
|
||||
|
||||
@@ -94,12 +94,12 @@ cannot share a folder with create permission
|
||||
|
||||
#### [copying a folder within a public link folder to folder with same name as an already existing file overwrites the parent file](https://github.com/owncloud/ocis/issues/1232)
|
||||
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:67](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L67)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:93](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L93)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L177)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L178)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:193](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L193)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:194](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L194)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L75)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L105)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:199](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L199)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L200)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:217](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L217)
|
||||
- [coreApiSharePublicLink2/copyFromPublicLink.feature:218](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L218)
|
||||
|
||||
#### [d:quota-available-bytes in dprop of PROPFIND give wrong response value](https://github.com/owncloud/ocis/issues/8197)
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@ class PublicWebDavContext implements Context {
|
||||
* @return void
|
||||
*/
|
||||
public function thePublicCopiesFileUsingTheWebDAVApi(string $source, string $destination, string $publicWebDAVAPIVersion):void {
|
||||
$token = $this->featureContext->getLastCreatedPublicShareToken();
|
||||
$token = ($this->featureContext->isUsingSharingNG()) ? $this->featureContext->shareNgGetLastCreatedLinkShareToken() : $this->featureContext->getLastCreatedPublicShareToken();
|
||||
$davPath = WebDavHelper::getDavPath(
|
||||
$token,
|
||||
0,
|
||||
|
||||
@@ -1810,9 +1810,8 @@ trait Sharing {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userGetsInfoOfLastPublicLinkShareUsingTheSharingApi(string $user, ?string $language = null):void {
|
||||
if ($this->getLastCreatedPublicShare()->id !== null) {
|
||||
$shareId = (string) $this->getLastCreatedPublicShare()->id;
|
||||
} else {
|
||||
$shareId = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareID() : $this->getLastCreatedPublicShare()->id;
|
||||
if ($shareId === null) {
|
||||
throw new Exception(
|
||||
__METHOD__ . " last public link share data was not found"
|
||||
);
|
||||
|
||||
@@ -74,7 +74,7 @@ class SharingNgContext implements Context {
|
||||
$itemId = $this->spacesContext->getResourceId($user, $space, $resource);
|
||||
|
||||
$bodyRows['displayName'] = $bodyRows['displayName'] ?? null;
|
||||
$bodyRows['expirationDateTime'] = $bodyRows['expirationDateTime'] ?? null;
|
||||
$bodyRows['expirationDateTime'] = \array_key_exists('expirationDateTime', $bodyRows) ? \date('Y-m-d', \strtotime($bodyRows['expirationDateTime'])) . 'T14:00:00.000Z' : null;
|
||||
$bodyRows['password'] = $bodyRows['password'] ?? null;
|
||||
$body = [
|
||||
'type' => $bodyRows['permissionsRole'],
|
||||
@@ -583,6 +583,24 @@ class SharingNgContext implements Context {
|
||||
$this->featureContext->shareNgAddToCreatedLinkShares($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^user "([^"]*)" has updated the last resource|space link share with$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
public function userHasUpdatedLastPublicLinkShare(string $user, TableNode $body):void {
|
||||
$response = $this->updateLinkShare(
|
||||
$user,
|
||||
$body,
|
||||
$this->featureContext->shareNgGetLastCreatedLinkShareID()
|
||||
);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, "Failed while updating public share link!", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" updates the last public link share using the Graph API with$/
|
||||
*
|
||||
@@ -608,6 +626,7 @@ class SharingNgContext implements Context {
|
||||
* @param string $permissionID
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function updateLinkShare(string $user, TableNode $body, string $permissionID): ResponseInterface {
|
||||
$bodyRows = $body->getRowsHash();
|
||||
@@ -625,6 +644,10 @@ class SharingNgContext implements Context {
|
||||
$body['expirationDateTime'] = empty($bodyRows['expirationDateTime']) ? null : $bodyRows['expirationDateTime'];
|
||||
}
|
||||
|
||||
if (\array_key_exists('displayName', $bodyRows)) {
|
||||
$body['displayName'] = $bodyRows['displayName'];
|
||||
}
|
||||
|
||||
return GraphHelper::updateShare(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
@@ -638,16 +661,14 @@ class SharingNgContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sets the following password for the last link share using the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
* @param string $permissionID
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userSetsOrUpdatesFollowingPasswordForLastLinkShareUsingTheGraphApi(string $user, TableNode $body):void {
|
||||
public function setLinkSharePassword(string $user, TableNode $body, string $permissionID): ResponseInterface {
|
||||
$bodyRows = $body->getRowsHash();
|
||||
$space = $bodyRows['space'];
|
||||
$resource = $bodyRows['resource'];
|
||||
@@ -662,7 +683,7 @@ class SharingNgContext implements Context {
|
||||
throw new Error('Password is missing to set for share link!');
|
||||
}
|
||||
|
||||
$response = GraphHelper::setLinkSharePassword(
|
||||
return GraphHelper::setLinkSharePassword(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
@@ -670,9 +691,45 @@ class SharingNgContext implements Context {
|
||||
$spaceId,
|
||||
$itemId,
|
||||
\json_encode($body),
|
||||
$permissionID
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given user :user has set the following password for the last link share:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userHasSetTheFollowingPasswordForTheLastLinkShare(string $user, TableNode $body):void {
|
||||
$response = $this->setLinkSharePassword(
|
||||
$user,
|
||||
$body,
|
||||
$this->featureContext->shareNgGetLastCreatedLinkShareID()
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
$this->featureContext->theHTTPStatusCodeShouldBe(200, "Failed while setting public share link password!", $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user sets the following password for the last link share using the Graph API:
|
||||
*
|
||||
* @param string $user
|
||||
* @param TableNode $body
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function userSetsOrUpdatesFollowingPasswordForLastLinkShareUsingTheGraphApi(string $user, TableNode $body):void {
|
||||
$this->featureContext->setResponse(
|
||||
$this->setLinkSharePassword(
|
||||
$user,
|
||||
$body,
|
||||
$this->featureContext->shareNgGetLastCreatedLinkShareID()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ Feature: delete a public link share
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | test-file.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| displayName | sharedlink |
|
||||
When user "Alice" deletes public link share named "sharedlink" in file "test-file.txt" using the sharing API
|
||||
@@ -32,7 +32,7 @@ Feature: delete a public link share
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | test-file.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| displayName | sharedlink |
|
||||
And user "Alice" has moved file "/test-file.txt" to "/renamed-test-file.txt"
|
||||
@@ -52,7 +52,7 @@ Feature: delete a public link share
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | test-folder |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| displayName | sharedlink |
|
||||
When user "Alice" deletes public link share named "sharedlink" in folder "test-folder" using the sharing API
|
||||
@@ -72,7 +72,7 @@ Feature: delete a public link share
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | test-folder/testfile.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
| displayName | sharedlink |
|
||||
And user "Alice" deletes public link share named "sharedlink" in file "/test-folder/testfile.txt" using the sharing API
|
||||
|
||||
@@ -12,9 +12,11 @@ Feature: copying from public link share
|
||||
|
||||
Scenario: copy file within a public link folder new public WebDAV API
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -26,9 +28,11 @@ Feature: copying from public link share
|
||||
Scenario: copy folder within a public link folder new public WebDAV API
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/testFolder-copy" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
@@ -40,9 +44,11 @@ Feature: copying from public link share
|
||||
Scenario: copy file within a public link folder to a new folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/testFolder/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -54,9 +60,11 @@ Feature: copying from public link share
|
||||
Scenario: copy file within a public link folder to same file name as already existing one
|
||||
Given user "Alice" has uploaded file with content "some data 0" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -68,9 +76,11 @@ Feature: copying from public link share
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
@@ -81,9 +91,11 @@ Feature: copying from public link share
|
||||
|
||||
Scenario: copy file within a public link folder and delete file
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
|
||||
And user "Alice" deletes file "/PARENT/copy1.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
@@ -94,9 +106,11 @@ Feature: copying from public link share
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/new-folder"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/new-folder/testfile1.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/new-folder" using the new public WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -107,9 +121,11 @@ Feature: copying from public link share
|
||||
|
||||
Scenario Outline: copy file with special characters in it's name within a public link folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/<file-name>"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/<file-name>" to "/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/<file-name>" should exist
|
||||
@@ -126,9 +142,11 @@ Feature: copying from public link share
|
||||
|
||||
Scenario Outline: copy file within a public link folder to a file with special characters in it's name
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/<destination-file-name>" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -146,9 +164,11 @@ Feature: copying from public link share
|
||||
Scenario Outline: copy file within a public link folder into a folder with special characters
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/<destination-folder-name>"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/<destination-folder-name>/copy1.txt" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -165,9 +185,11 @@ Feature: copying from public link share
|
||||
@issue-1230
|
||||
Scenario Outline: copy file within a public link folder to a file with unusual destination names
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/<destination-file-name>" using the new public WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
@@ -181,9 +203,11 @@ Feature: copying from public link share
|
||||
Scenario Outline: copy folder within a public link folder to a folder with unusual destination names
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/<destination-file-name>" using the new public WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
|
||||
@@ -10,27 +10,28 @@ Feature: multi-link sharing
|
||||
Scenario Outline: creating three public shares of a folder
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink3 |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | read |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -49,24 +50,28 @@ Feature: multi-link sharing
|
||||
Scenario Outline: creating three public shares of a file
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink3 |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | read |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -85,20 +90,21 @@ Feature: multi-link sharing
|
||||
Scenario Outline: check that updating password doesn't remove name of links
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink2 |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| password | New-StronPass1 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -117,18 +123,20 @@ Feature: multi-link sharing
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has deleted file "/textfile0.txt"
|
||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
@@ -147,24 +155,27 @@ Feature: multi-link sharing
|
||||
Scenario Outline: deleting one public link share of a file doesn't affect the rest
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink3 |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" deletes public link share named "sharedlink2" in file "/textfile0.txt" using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
@@ -182,18 +193,20 @@ Feature: multi-link sharing
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | textfile0.txt |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| permissions | read |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as user "Alice" the public shares of file "/textfile0.txt" should be
|
||||
@@ -215,20 +228,20 @@ Feature: multi-link sharing
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink1 |
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| expireDate | +3 days |
|
||||
| publicUpload | true |
|
||||
| permissions | change |
|
||||
| name | sharedlink2 |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" moves folder "/FOLDER" to "/FOLDER_RENAMED" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as user "Alice" the public shares of file "/FOLDER_RENAMED" should be
|
||||
|
||||
@@ -11,9 +11,12 @@ Feature: update a public link share
|
||||
Scenario Outline: change expiration date of a public link share and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| expireDate | 2040-01-01T23:59:59+0100 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -52,11 +55,16 @@ Feature: update a public link share
|
||||
Scenario Outline: change expiration date of a newly created public link share and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| expireDate | 2033-01-31T23:59:59+0100 |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| expirationDateTime | 2033-01-31T23:59:59.000Z |
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
@@ -86,15 +94,17 @@ Feature: update a public link share
|
||||
Scenario Outline: creating a new public link share with password and adding an expiration date using public API
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | randomfile.txt |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | randomfile.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| expireDate | 2040-01-01T23:59:59+0100 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And the public should be able to download the last publicly shared file using the old public WebDAV API with password "%public%" and the content should be "Random data"
|
||||
And the public should be able to download the last publicly shared file using the new public WebDAV API with password "%public%" and the content should be "Random data"
|
||||
And the public should be able to download file "randomfile.txt" from the last link share with password "%public%" and the content should be "Random data"
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
@@ -104,10 +114,15 @@ Feature: update a public link share
|
||||
Scenario Outline: creating a new public link share, updating its password and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has set the following password for the last link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| password | %public% |
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -137,11 +152,16 @@ Feature: update a public link share
|
||||
Scenario Outline: creating a new public link share, updating its permissions and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
@@ -170,63 +190,35 @@ Feature: update a public link share
|
||||
Scenario Outline: creating a new public link share, updating its permissions to view download and upload and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | upload |
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read,update,create,delete |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: creating a new public link share, updating publicUpload option and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| publicUpload | true |
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read,update,create,delete |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read,create |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
@@ -238,12 +230,16 @@ Feature: update a public link share
|
||||
And user "Alice" has created folder "PARENT"
|
||||
And user "Alice" has created folder "PARENT/CHILD"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/CHILD/child.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read,update,create,delete |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| permissions | read |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
When the public deletes file "CHILD/child.txt" from the last public link share using the password "%public%" and new public WebDAV API
|
||||
Then the HTTP status code of responses on all endpoints should be "403"
|
||||
And as "Alice" file "PARENT/CHILD/child.txt" should exist
|
||||
@@ -259,12 +255,16 @@ Feature: update a public link share
|
||||
And user "Alice" has created folder "PARENT/CHILD"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/parent.txt"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/CHILD/child.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /PARENT |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last public link share with
|
||||
| permissions | read,update,create,delete |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public deletes file "CHILD/child.txt" from the last public link share using the password "%public%" and new public WebDAV API
|
||||
And the public deletes file "parent.txt" from the last public link share using the password "%public%" and new public WebDAV API
|
||||
Then the HTTP status code of responses on all endpoints should be "204"
|
||||
@@ -280,9 +280,12 @@ Feature: update a public link share
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has moved folder "/FOLDER" to "/RENAMED_FOLDER"
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -327,9 +330,12 @@ Feature: update a public link share
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "some content" to "/lorem.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | lorem.txt |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | lorem.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has moved file "/lorem.txt" to "/new-lorem.txt"
|
||||
When user "Alice" gets the info of the last public link share using the sharing API
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
@@ -374,10 +380,12 @@ Feature: update a public link share
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile.txt"
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | /textfile.txt |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | 0 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
|
||||
@@ -12,10 +12,12 @@ Feature: upload to a public link share
|
||||
|
||||
Scenario Outline: uploading file to a public upload-only share using public API that was deleted does not work
|
||||
Given using <dav-path-version> DAV path
|
||||
And user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | create |
|
||||
| password | %public% |
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
And user "Alice" has deleted folder "/FOLDER"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
|
||||
And the HTTP status code should be "404"
|
||||
@@ -33,19 +35,23 @@ Feature: upload to a public link share
|
||||
|
||||
@issue-1269
|
||||
Scenario: uploading file to a public read-only share folder with public API does not work
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | read |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
|
||||
And the HTTP status code should be "403"
|
||||
|
||||
|
||||
Scenario: uploading to a public upload-only share with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | create |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
@@ -54,60 +60,72 @@ Feature: upload to a public link share
|
||||
|
||||
|
||||
Scenario: uploading to a public upload-only share with password with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| permissions | create |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
|
||||
|
||||
Scenario: uploading to a public read/write share with password with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| password | %public% |
|
||||
| permissions | change |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
|
||||
@skipOnReva
|
||||
Scenario: uploading file to a public shared folder with read/write permission when the sharer has insufficient quota does not work with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | change |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
@skipOnReva
|
||||
Scenario: uploading file to a public shared folder with upload-only permission when the sharer has insufficient quota does not work with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | create |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
@smokeTest
|
||||
Scenario: uploading to a public upload-write and no edit and no overwrite share with public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | uploadwriteonly |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test2"
|
||||
|
||||
@smokeTest @issue-1267
|
||||
Scenario: uploading same file to a public upload-write and no edit and no overwrite share multiple times with new public API
|
||||
Given user "Alice" has created a public link share with settings
|
||||
| path | FOLDER |
|
||||
| permissions | uploadwriteonly |
|
||||
| password | %public% |
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test" using the new public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the following headers should match these regular expressions
|
||||
|
||||
Reference in New Issue
Block a user