diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-03 20:58:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-31 20:12:34 +0200 |
commit | 8c0ef4c4bda4836aa7f4f3b180d1d132c8ca9879 (patch) | |
tree | d42260371b3031a8dcd8ef0e7ac1eba4e6bfe9e2 /build/integration/features/bootstrap | |
parent | bfb5748f1f9d0c76ce311a88ea117c0cb3d7a653 (diff) | |
download | nextcloud-server-8c0ef4c4bda4836aa7f4f3b180d1d132c8ca9879.tar.gz nextcloud-server-8c0ef4c4bda4836aa7f4f3b180d1d132c8ca9879.zip |
Add sharePermissions webdav property
This property can be queries by the clients so they know the max
permissions they can use to share a file with. This will improve the UX.
The oc:permissions proptery is not enough since mountpoints have
different permissions (delete + move by default).
By making it a new property the clients can just request it. On older
servers it will just return a 404 for that property (and thus they know
they have to fall back to their hacky work arounds). But if the property
is returned the client can show proper info.
* unit tests
* intergration test
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index b56a1b7d2f6..2ef5f252f11 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -316,6 +316,20 @@ trait WebDav { } /** + * @When User :user uploads file with content :content to :destination + */ + public function userUploadsAFileWithContentTo($user, $content, $destination) + { + $file = \GuzzleHttp\Stream\Stream::factory($content); + try { + $this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file); + } catch (\GuzzleHttp\Exception\ServerException $e) { + // 4xx and 5xx responses cause an exception + $this->response = $e->getResponse(); + } + } + + /** * @When User :user deletes file :file * @param string $user * @param string $file |