diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-01 09:08:09 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-01 09:08:09 +0200 |
commit | b84746ce36424615aef91e49a5977fc9d15a17c7 (patch) | |
tree | 3e2a91f61ffcf3780c14221aa4a0c1aeab46f325 /lib/private/encryption/util.php | |
parent | e3cc82df386d6a0b80cd843c8e08b7349e7f11e6 (diff) | |
parent | 2cb45e71ea9602de9fb16662c1501495041b270d (diff) | |
download | nextcloud-server-b84746ce36424615aef91e49a5977fc9d15a17c7.tar.gz nextcloud-server-b84746ce36424615aef91e49a5977fc9d15a17c7.zip |
Merge pull request #23710 from owncloud/fix_encryption_versions_on_external_storages_9.0
[stable9] fix creation of versions of encrypted files on external storages
Diffstat (limited to 'lib/private/encryption/util.php')
-rw-r--r-- | lib/private/encryption/util.php | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php index 860c541934a..9e0cfca830d 100644 --- a/lib/private/encryption/util.php +++ b/lib/private/encryption/util.php @@ -28,10 +28,8 @@ use OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException; use OC\Encryption\Exceptions\EncryptionHeaderToLargeException; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; use OC\Files\Filesystem; -use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; use OCP\Encryption\IEncryptionModule; -use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage; use OCP\IConfig; @@ -392,52 +390,4 @@ class Util { return $this->config->getAppValue('core', 'encryption_key_storage_root', ''); } - /** - * Wraps the given storage when it is not a shared storage - * - * @param string $mountPoint - * @param Storage $storage - * @param IMountPoint $mount - * @return Encryption|Storage - */ - public function wrapStorage($mountPoint, Storage $storage, IMountPoint $mount) { - $parameters = [ - 'storage' => $storage, - 'mountPoint' => $mountPoint, - 'mount' => $mount]; - - if (!$storage->instanceOfStorage('OC\Files\Storage\Shared') - && !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') - && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud')) { - - $manager = \OC::$server->getEncryptionManager(); - $user = \OC::$server->getUserSession()->getUser(); - $logger = \OC::$server->getLogger(); - $mountManager = Filesystem::getMountManager(); - $uid = $user ? $user->getUID() : null; - $fileHelper = \OC::$server->getEncryptionFilesHelper(); - $keyStorage = \OC::$server->getEncryptionKeyStorage(); - $update = new Update( - new View(), - $this, - Filesystem::getMountManager(), - $manager, - $fileHelper, - $uid - ); - return new Encryption( - $parameters, - $manager, - $this, - $logger, - $fileHelper, - $uid, - $keyStorage, - $update, - $mountManager - ); - } else { - return $storage; - } - } } |