aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-02 14:30:52 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-12 11:28:03 +0200
commitcb1b366baf75da4c578bc534884eefa7f6b4b3d2 (patch)
treebdb367d502a6990c39165960a76d3268270162ef /build/integration/features/bootstrap
parent1a7acf061e26d938e2162f791afb262dc7c2b90d (diff)
downloadnextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.tar.gz
nextcloud-server-cb1b366baf75da4c578bc534884eefa7f6b4b3d2.zip
fix(dav): Ensure share properties are also set on public remote endpoint
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/WebDav.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 852317f76a3..fff990fc141 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -52,6 +52,14 @@ trait WebDav {
$this->usingOldDavPath = false;
}
+ /**
+ * @Given /^using new public dav path$/
+ */
+ public function usingNewPublicDavPath() {
+ $this->davPath = "public.php/dav";
+ $this->usingOldDavPath = false;
+ }
+
public function getDavFilesPath($user) {
if ($this->usingOldDavPath === true) {
return $this->davPath;
@@ -75,7 +83,7 @@ trait WebDav {
];
if ($user === 'admin') {
$options['auth'] = $this->adminUser;
- } else {
+ } elseif ($user !== '') {
$options['auth'] = [$user, $this->regularUser];
}
return $client->request($method, $fullUrl, $options);
@@ -942,6 +950,23 @@ trait WebDav {
}
/**
+ * @When Requesting share note on dav endpoint
+ */
+ public function requestingShareNote() {
+ $propfind = '<d:propfind xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns"><d:prop><nc:note /></d:prop></d:propfind>';
+ if (count($this->lastShareData->data->element) > 0) {
+ $token = $this->lastShareData->data[0]->token;
+ } else {
+ $token = $this->lastShareData->data->token;
+ }
+ try {
+ $this->response = $this->makeDavRequest('', 'PROPFIND', $token, [], $propfind);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ $this->response = $e->getResponse();
+ }
+ }
+
+ /**
* @Then there are no duplicate headers
*/
public function thereAreNoDuplicateHeaders() {