summaryrefslogtreecommitdiffstats
path: root/apps/encryption/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-09-07 12:38:55 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-09-08 14:58:42 +0200
commitb2e6d7b5f490385bf05199be0daee0f04d83aa73 (patch)
treeeff2b39438a150b204865a7c04e9d01a80769ed9 /apps/encryption/appinfo
parentacfc7d7c4d4c2daf00ecd61b11eaa9d953868b92 (diff)
downloadnextcloud-server-b2e6d7b5f490385bf05199be0daee0f04d83aa73.tar.gz
nextcloud-server-b2e6d7b5f490385bf05199be0daee0f04d83aa73.zip
occ command to enable master key
Diffstat (limited to 'apps/encryption/appinfo')
-rw-r--r--apps/encryption/appinfo/register_command.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/encryption/appinfo/register_command.php b/apps/encryption/appinfo/register_command.php
index 4fdf7ecec38..0f03b63560a 100644
--- a/apps/encryption/appinfo/register_command.php
+++ b/apps/encryption/appinfo/register_command.php
@@ -21,10 +21,17 @@
*/
use OCA\Encryption\Command\MigrateKeys;
+use Symfony\Component\Console\Helper\QuestionHelper;
$userManager = OC::$server->getUserManager();
$view = new \OC\Files\View();
$config = \OC::$server->getConfig();
+$userSession = \OC::$server->getUserSession();
$connection = \OC::$server->getDatabaseConnection();
$logger = \OC::$server->getLogger();
+$questionHelper = new QuestionHelper();
+$crypt = new \OCA\Encryption\Crypto\Crypt($logger, $userSession, $config);
+$util = new \OCA\Encryption\Util($view, $crypt, $logger, $userSession, $config, $userManager);
+
$application->add(new MigrateKeys($userManager, $view, $connection, $config, $logger));
+$application->add(new \OCA\Encryption\Command\EnableMasterKey($util, $config, $questionHelper));