summaryrefslogtreecommitdiffstats
path: root/apps/encryption/appinfo
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2015-03-24 17:29:10 -0400
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:27 +0200
commit0c2f9ca849ef41232511cf576cc9a9de2caa43f0 (patch)
treea75194b573985da4a68684cb5a74c9891db34696 /apps/encryption/appinfo
parent506222567e71fc0d77fa77ee7805c93fa7655b6c (diff)
downloadnextcloud-server-0c2f9ca849ef41232511cf576cc9a9de2caa43f0.tar.gz
nextcloud-server-0c2f9ca849ef41232511cf576cc9a9de2caa43f0.zip
Updating keystorage movement and fixing hooks
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r--apps/encryption/appinfo/encryption.php43
1 files changed, 26 insertions, 17 deletions
diff --git a/apps/encryption/appinfo/encryption.php b/apps/encryption/appinfo/encryption.php
index f2ab89aadef..1a4c17eb60a 100644
--- a/apps/encryption/appinfo/encryption.php
+++ b/apps/encryption/appinfo/encryption.php
@@ -21,16 +21,16 @@
namespace OCA\Encryption\AppInfo;
+use OC\Files\Filesystem;
+use OC\Files\View;
use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\HookManager;
-use OCA\Encryption\Hooks\AppHooks;
-use OCA\Encryption\Hooks\FileSystemHooks;
-use OCA\Encryption\Hooks\ShareHooks;
use OCA\Encryption\Hooks\UserHooks;
use OCA\Encryption\KeyManager;
use OCA\Encryption\Migrator;
use OCA\Encryption\Recovery;
use OCA\Encryption\Users\Setup;
+use OCA\Encryption\Util;
use OCP\App;
use OCP\AppFramework\IAppContainer;
use OCP\Encryption\IManager;
@@ -81,14 +81,7 @@ class Encryption extends \OCP\AppFramework\App {
$hookManager = new HookManager();
$hookManager->registerHook([
- new UserHooks($container->query('KeyManager'),
- $server->getLogger(),
- $container->query('UserSetup'),
- $container->query('Migrator'),
- $server->getUserSession()),
-// new ShareHooks(),
-// new FileSystemHooks(),
-// new AppHooks()
+ new UserHooks($container->query('KeyManager'), $server->getLogger(), $container->query('UserSetup'), $server->getUserSession(), new \OCP\Util(), $container->query('Util')),
]);
$hookManager->fireHooks();
@@ -103,7 +96,7 @@ class Encryption extends \OCP\AppFramework\App {
*
*/
public function registerEncryptionModule() {
-// $this->encryptionManager->registerEncryptionModule(new \OCA\Encryption\Crypto\Encryption());
+ $this->encryptionManager->registerEncryptionModule(new \OCA\Encryption\Crypto\Encryption());
}
/**
@@ -124,10 +117,13 @@ class Encryption extends \OCP\AppFramework\App {
function (IAppContainer $c) {
$server = $c->getServer();
- return new KeyManager($server->getEncryptionKeyStorage(),
+ return new KeyManager($server->getEncryptionKeyStorage('encryption'),
$c->query('Crypt'),
$server->getConfig(),
- $server->getUserSession());
+ $server->getUserSession(),
+ $server->getMemCacheFactory(),
+ $server->getLogger()
+ );
});
@@ -141,7 +137,7 @@ class Encryption extends \OCP\AppFramework\App {
$server->getSecureRandom(),
$c->query('KeyManager'),
$server->getConfig(),
- $server->getEncryptionKeyStorage());
+ $server->getEncryptionKeyStorage('encryption'));
});
$container->registerService('UserSetup',
@@ -157,13 +153,26 @@ class Encryption extends \OCP\AppFramework\App {
function (IAppContainer $c) {
$server = $c->getServer();
- return new Migrator($server->getUserSession(),
- $server->getConfig(),
+ return new Migrator($server->getConfig(),
$server->getUserManager(),
$server->getLogger(),
$c->query('Crypt'));
});
+ $container->registerService('Util',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+
+ return new Util(new View(),
+ new Filesystem(),
+ $c->query('Crypt'),
+ $c->query('KeyManager'),
+ $server->getLogger(),
+ $server->getUserSession(),
+ $server->getConfig()
+ );
+ });
+
}
/**