diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-08-29 20:37:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-29 20:37:07 +0200 |
commit | 4f93dce2e13df9001140344d3fa310075c348262 (patch) | |
tree | ec58ac5db237249966872a2043aedb7994f03f57 | |
parent | e1ea45f32bf2e06696b78c4e18ffbd5ffc3017cb (diff) | |
parent | 6c365cb06d1aff8d44758be1337ba30acdcc49d7 (diff) | |
download | nextcloud-server-4f93dce2e13df9001140344d3fa310075c348262.tar.gz nextcloud-server-4f93dce2e13df9001140344d3fa310075c348262.zip |
Merge pull request #1130 from nextcloud/shared-upload-quota
[uc] Fix uploading to shared folder with quota
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 10 | ||||
-rw-r--r-- | build/integration/features/webdav-related.feature | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 3ceca430424..e1875fe2394 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -106,6 +106,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 */ public function getShareId() { diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index c49db4f8a5d..a59d65a2674 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" |