summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/WebDav.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-07-12 14:37:15 +0200
committerGitHub <noreply@github.com>2016-07-12 14:37:15 +0200
commit3de4dfb2e57c2f87e23a288823853554da9790ff (patch)
tree473dee750e1e2e3c4b3fc4710b03dd18b463b874 /build/integration/features/bootstrap/WebDav.php
parent0ddbf5c9812d869db7df4473637927edaa0da9b1 (diff)
parentc301b8d71e1cd09446772cef92ca43c0a5218086 (diff)
downloadnextcloud-server-3de4dfb2e57c2f87e23a288823853554da9790ff.tar.gz
nextcloud-server-3de4dfb2e57c2f87e23a288823853554da9790ff.zip
Merge pull request #25448 from owncloud/stable9.1-webdav-copypermissions
[stable9.1] Additional perm check in Webdav
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r--build/integration/features/bootstrap/WebDav.php28
1 files changed, 26 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 0abb8667739..3df37db72bb 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -67,7 +67,27 @@ trait WebDav {
public function userMovesFile($user, $fileSource, $fileDestination){
$fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath;
$headers['Destination'] = $fullUrl . $fileDestination;
- $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers);
+ try {
+ $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ $this->response = $e->getResponse();
+ }
+ }
+
+ /**
+ * @When /^User "([^"]*)" copies file "([^"]*)" to "([^"]*)"$/
+ * @param string $user
+ * @param string $fileSource
+ * @param string $fileDestination
+ */
+ public function userCopiesFile($user, $fileSource, $fileDestination){
+ $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath;
+ $headers['Destination'] = $fullUrl . $fileDestination;
+ try {
+ $this->response = $this->makeDavRequest($user, "COPY", $fileSource, $headers);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ $this->response = $e->getResponse();
+ }
}
/**
@@ -142,7 +162,11 @@ trait WebDav {
* @param string $fileName
*/
public function downloadingFile($fileName) {
- $this->response = $this->makeDavRequest($this->currentUser, 'GET', $fileName, []);
+ try {
+ $this->response = $this->makeDavRequest($this->currentUser, 'GET', $fileName, []);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ $this->response = $e->getResponse();
+ }
}
/**