diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-24 15:56:04 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-26 14:58:22 +0200 |
commit | 8c08dd0ac26290829b10e28c333358ae10d953eb (patch) | |
tree | a80791395ea10b3bc2573d2576a12ceb396d71da /apps/encryption/appinfo | |
parent | 6c8c8a328abb0823a8b20e30c2ace06f2b568ea3 (diff) | |
download | nextcloud-server-8c08dd0ac26290829b10e28c333358ae10d953eb.tar.gz nextcloud-server-8c08dd0ac26290829b10e28c333358ae10d953eb.zip |
occ tool to encrypt all files
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r-- | apps/encryption/appinfo/application.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php index d4804394c5f..cba8964eefb 100644 --- a/apps/encryption/appinfo/application.php +++ b/apps/encryption/appinfo/application.php @@ -30,6 +30,7 @@ use OCA\Encryption\Controller\RecoveryController; use OCA\Encryption\Controller\SettingsController; use OCA\Encryption\Controller\StatusController; use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\Crypto\EncryptAll; use OCA\Encryption\Crypto\Encryption; use OCA\Encryption\HookManager; use OCA\Encryption\Hooks\UserHooks; @@ -42,6 +43,7 @@ use OCP\App; use OCP\AppFramework\IAppContainer; use OCP\Encryption\IManager; use OCP\IConfig; +use Symfony\Component\Console\Helper\QuestionHelper; class Application extends \OCP\AppFramework\App { @@ -111,6 +113,7 @@ class Application extends \OCP\AppFramework\App { $container->query('Crypt'), $container->query('KeyManager'), $container->query('Util'), + $container->query('EncryptAll'), $container->getServer()->getLogger(), $container->getServer()->getL10N($container->getAppName()) ); @@ -221,6 +224,23 @@ class Application extends \OCP\AppFramework\App { $server->getUserManager()); }); + $container->registerService('EncryptAll', + function (IAppContainer $c) { + $server = $c->getServer(); + return new EncryptAll( + $c->query('UserSetup'), + $c->getServer()->getUserManager(), + new View(), + $c->query('KeyManager'), + $server->getConfig(), + $server->getMailer(), + $server->getL10N('encryption'), + new QuestionHelper(), + $server->getSecureRandom() + ); + } + ); + } public function registerSettings() { |