diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-10-13 17:54:06 +0200 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-10-27 14:24:20 +0100 |
commit | 5fad45b2309426c5b91af1d87beaa9950eadc5ba (patch) | |
tree | 0c45e969b3a5b457c47169ff540df82f46ae14b3 /apps/encryption/controller | |
parent | d7d5a3bab51d952e05965e84b784d7eff0efc9c9 (diff) | |
download | nextcloud-server-5fad45b2309426c5b91af1d87beaa9950eadc5ba.tar.gz nextcloud-server-5fad45b2309426c5b91af1d87beaa9950eadc5ba.zip |
make encryption configurable for home storage
Diffstat (limited to 'apps/encryption/controller')
-rw-r--r-- | apps/encryption/controller/settingscontroller.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/encryption/controller/settingscontroller.php b/apps/encryption/controller/settingscontroller.php index e5bb79a1d40..59e23087b3a 100644 --- a/apps/encryption/controller/settingscontroller.php +++ b/apps/encryption/controller/settingscontroller.php @@ -25,6 +25,7 @@ namespace OCA\Encryption\Controller; use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\KeyManager; use OCA\Encryption\Session; +use OCA\Encryption\Util; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; @@ -57,6 +58,9 @@ class SettingsController extends Controller { /** @var ISession */ private $ocSession; + /** @var Util */ + private $util; + /** * @param string $AppName * @param IRequest $request @@ -67,6 +71,7 @@ class SettingsController extends Controller { * @param Crypt $crypt * @param Session $session * @param ISession $ocSession + * @param Util $util */ public function __construct($AppName, IRequest $request, @@ -76,7 +81,9 @@ class SettingsController extends Controller { KeyManager $keyManager, Crypt $crypt, Session $session, - ISession $ocSession) { + ISession $ocSession, + Util $util +) { parent::__construct($AppName, $request); $this->l = $l10n; $this->userSession = $userSession; @@ -85,6 +92,7 @@ class SettingsController extends Controller { $this->crypt = $crypt; $this->session = $session; $this->ocSession = $ocSession; + $this->util = $util; } @@ -143,4 +151,15 @@ class SettingsController extends Controller { } } + + /** + * @UseSession + * + * @param bool $encryptHomeStorage + * @return DataResponse + */ + public function setEncryptHomeStorage($encryptHomeStorage) { + $this->util->setEncryptHomeStorage($encryptHomeStorage); + return new DataResponse(); + } } |