aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/settings
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-10-13 17:54:06 +0200
committerBjörn Schießle <bjoern@schiessle.org>2015-10-27 14:24:20 +0100
commit5fad45b2309426c5b91af1d87beaa9950eadc5ba (patch)
tree0c45e969b3a5b457c47169ff540df82f46ae14b3 /apps/encryption/settings
parentd7d5a3bab51d952e05965e84b784d7eff0efc9c9 (diff)
downloadnextcloud-server-5fad45b2309426c5b91af1d87beaa9950eadc5ba.tar.gz
nextcloud-server-5fad45b2309426c5b91af1d87beaa9950eadc5ba.zip
make encryption configurable for home storage
Diffstat (limited to 'apps/encryption/settings')
-rw-r--r--apps/encryption/settings/settings-admin.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/encryption/settings/settings-admin.php b/apps/encryption/settings/settings-admin.php
index c7ac8c09c6b..8d55d587fed 100644
--- a/apps/encryption/settings/settings-admin.php
+++ b/apps/encryption/settings/settings-admin.php
@@ -25,12 +25,27 @@
$tmpl = new OCP\Template('encryption', 'settings-admin');
+$crypt = new \OCA\Encryption\Crypto\Crypt(
+ \OC::$server->getLogger(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getConfig());
+
+$util = new \OCA\Encryption\Util(
+ new \OC\Files\View(),
+ $crypt,
+ \OC::$server->getLogger(),
+ \OC::$server->getUserSession(),
+ \OC::$server->getConfig(),
+ \OC::$server->getUserManager());
+
// Check if an adminRecovery account is enabled for recovering files after lost pwd
$recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled', '0');
$session = new \OCA\Encryption\Session(\OC::$server->getSession());
+$encryptHomeStorage = $util->shouldEncryptHomeStorage($user);
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
$tmpl->assign('initStatus', $session->getStatus());
+$tmpl->assign('encryptHomeStorage', $encryptHomeStorage);
return $tmpl->fetchPage();