From c16b15d52e24eb8bcfabbf535c360d6580a6ee70 Mon Sep 17 00:00:00 2001 From: Sergio Bertolin Date: Tue, 26 Jul 2016 15:59:02 +0000 Subject: [PATCH 1/2] Added integration test --- .../features/webdav-related.feature | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index c49db4f8a5..a59d65a267 100644 --- a/build/integration/features/webdav-related.feature +++ b/build/integration/features/webdav-related.feature @@ -59,6 +59,24 @@ Feature: webdav-related |{DAV:}quota-available-bytes| And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" + Scenario: Uploading a file as recipient using webdav having quota + Given using dav path "remote.php/webdav" + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" has a quota of "10 MB" + And user "user1" has a quota of "10 MB" + And As an "user1" + And user "user1" created a folder "/testquota" + And as "user1" creating a share with + | path | testquota | + | shareType | 0 | + | permissions | 31 | + | shareWith | user0 | + And As an "user0" + When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" + Then the HTTP status code should be "201" + Scenario: download a public shared file with range Given user "user0" exists And As an "user0" From 6c365cb06d1aff8d44758be1337ba30acdcc49d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 1 Aug 2016 14:22:30 +0200 Subject: [PATCH 2/2] A shared storage is never a home storage - fixes #25582 --- apps/files_sharing/lib/sharedstorage.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 3ceca43042..e1875fe239 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -105,6 +105,16 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage { } } + /** + * @inheritdoc + */ + public function instanceOfStorage($class) { + if (in_array($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage'])) { + return false; + } + return parent::instanceOfStorage($class); + } + /** * @return string */