summaryrefslogtreecommitdiffstats
path: root/apps/encryption/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-08-24 12:03:53 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-09-15 22:39:44 +0200
commit9bd4f2d41e5a211ad60a83bfcdc60b8633076a54 (patch)
tree345f1f4c89bd1ee1dcd50f8106e87238d53e3b64 /apps/encryption/appinfo
parent230029e5090b3deecb941e75bbc34a6bcb98c374 (diff)
downloadnextcloud-server-9bd4f2d41e5a211ad60a83bfcdc60b8633076a54.tar.gz
nextcloud-server-9bd4f2d41e5a211ad60a83bfcdc60b8633076a54.zip
occ script to disable encryption and to decrypt all files again
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r--apps/encryption/appinfo/application.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
index 75107b2723c..515a408fa2c 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\DecryptAll;
use OCA\Encryption\Crypto\EncryptAll;
use OCA\Encryption\Crypto\Encryption;
use OCA\Encryption\HookManager;
@@ -113,7 +114,9 @@ class Application extends \OCP\AppFramework\App {
$container->query('Crypt'),
$container->query('KeyManager'),
$container->query('Util'),
+ $container->query('Session'),
$container->query('EncryptAll'),
+ $container->query('DecryptAll'),
$container->getServer()->getLogger(),
$container->getServer()->getL10N($container->getAppName())
);
@@ -242,6 +245,18 @@ class Application extends \OCP\AppFramework\App {
}
);
+ $container->registerService('DecryptAll',
+ function (IAppContainer $c) {
+ return new DecryptAll(
+ $c->query('Util'),
+ $c->query('KeyManager'),
+ $c->query('Crypt'),
+ $c->query('Session'),
+ new QuestionHelper()
+ );
+ }
+ );
+
}
public function registerSettings() {