summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/Lib/Storage/OwnCloud.php3
-rw-r--r--apps/files_sharing/lib/External/Storage.php3
-rw-r--r--apps/files_sharing/lib/SharedStorage.php3
-rw-r--r--lib/private/Encryption/EncryptionWrapper.php4
-rw-r--r--lib/public/Files/Storage/IDisableEncryptionStorage.php31
5 files changed, 38 insertions, 6 deletions
diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php
index 3ee2b70ef22..04cd5ecf9af 100644
--- a/apps/files_external/lib/Lib/Storage/OwnCloud.php
+++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php
@@ -25,6 +25,7 @@
*/
namespace OCA\Files_External\Lib\Storage;
+use OCP\Files\Storage\IDisableEncryptionStorage;
use Sabre\DAV\Client;
/**
@@ -34,7 +35,7 @@ use Sabre\DAV\Client;
* http://%host/%context/remote.php/webdav/%root
*
*/
-class OwnCloud extends \OC\Files\Storage\DAV{
+class OwnCloud extends \OC\Files\Storage\DAV implements IDisableEncryptionStorage {
const OC_URL_SUFFIX = 'remote.php/webdav';
public function __construct($params) {
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index dadb1def702..7411d3c51b6 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -39,10 +39,11 @@ use OCP\AppFramework\Http;
use OCP\Constants;
use OCP\Federation\ICloudId;
use OCP\Files\NotFoundException;
+use OCP\Files\Storage\IDisableEncryptionStorage;
use OCP\Files\StorageInvalidException;
use OCP\Files\StorageNotAvailableException;
-class Storage extends DAV implements ISharedStorage {
+class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage {
/** @var ICloudId */
private $cloudId;
/** @var string */
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index f9c4a85fac6..67868b512c3 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -39,6 +39,7 @@ use OC\Files\Storage\FailedStorage;
use OCP\Constants;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\NotFoundException;
+use OCP\Files\Storage\IDisableEncryptionStorage;
use OCP\Files\Storage\IStorage;
use OCP\Lock\ILockingProvider;
use OC\User\NoUserException;
@@ -46,7 +47,7 @@ use OC\User\NoUserException;
/**
* Convert target path to source path and pass the function call to the correct storage provider
*/
-class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
+class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage, IDisableEncryptionStorage {
/** @var \OCP\Share\IShare */
private $superShare;
diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php
index d0f3ae79d48..c4650d39ee3 100644
--- a/lib/private/Encryption/EncryptionWrapper.php
+++ b/lib/private/Encryption/EncryptionWrapper.php
@@ -82,9 +82,7 @@ class EncryptionWrapper {
'mount' => $mount
];
- if (!$storage->instanceOfStorage('OCA\Files_Sharing\SharedStorage')
- && !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage')
- && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud')) {
+ if (!$storage->instanceOfStorage(Storage\IDisableEncryptionStorage::class)) {
$user = \OC::$server->getUserSession()->getUser();
$mountManager = Filesystem::getMountManager();
diff --git a/lib/public/Files/Storage/IDisableEncryptionStorage.php b/lib/public/Files/Storage/IDisableEncryptionStorage.php
new file mode 100644
index 00000000000..4941ecfb52c
--- /dev/null
+++ b/lib/public/Files/Storage/IDisableEncryptionStorage.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Files\Storage;
+
+/**
+ * Marks that a storage does not support server side encryption
+ *
+ * @since 15.0.0
+ */
+interface IDisableEncryptionStorage {
+
+} \ No newline at end of file