diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-31 17:13:36 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:29 +0200 |
commit | 1358d07d3516ffb6ecedc451bd1a0ad60d3cb673 (patch) | |
tree | 9e25e4c5c98a31c4edf0a9a4139cd93a90ac6e2d /apps/encryption/lib/util.php | |
parent | e4895bda01f9c94fc33e094ae9466e1cf5502916 (diff) | |
download | nextcloud-server-1358d07d3516ffb6ecedc451bd1a0ad60d3cb673.tar.gz nextcloud-server-1358d07d3516ffb6ecedc451bd1a0ad60d3cb673.zip |
let user enable recovery key
Diffstat (limited to 'apps/encryption/lib/util.php')
-rw-r--r-- | apps/encryption/lib/util.php | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/apps/encryption/lib/util.php b/apps/encryption/lib/util.php index 45891be5dad..6b6b8b6b38c 100644 --- a/apps/encryption/lib/util.php +++ b/apps/encryption/lib/util.php @@ -23,16 +23,13 @@ namespace OCA\Encryption; -use OC\Files\Filesystem; use OC\Files\View; use OCA\Encryption\Crypto\Crypt; -use OCP\App; use OCP\IConfig; use OCP\ILogger; use OCP\IUser; use OCP\IUserSession; use OCP\PreConditionNotMetException; -use OCP\Share; class Util { /** @@ -44,10 +41,6 @@ class Util { */ private $crypt; /** - * @var KeyManager - */ - private $keyManager; - /** * @var ILogger */ private $logger; @@ -65,21 +58,18 @@ class Util { * * @param View $files * @param Crypt $crypt - * @param KeyManager $keyManager * @param ILogger $logger * @param IUserSession $userSession * @param IConfig $config */ public function __construct(View $files, Crypt $crypt, - KeyManager $keyManager, ILogger $logger, IUserSession $userSession, IConfig $config ) { $this->files = $files; $this->crypt = $crypt; - $this->keyManager = $keyManager; $this->logger = $logger; $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser() : false; $this->config = $config; @@ -88,7 +78,7 @@ class Util { /** * @return bool */ - public function recoveryEnabledForUser() { + public function isRecoveryEnabledForUser() { $recoveryMode = $this->config->getUserValue($this->user->getUID(), 'encryption', 'recoveryEnabled', @@ -116,18 +106,6 @@ class Util { } /** - * @param $recoveryPassword - */ - public function recoverUsersFiles($recoveryPassword) { - $encryptedKey = $this->keyManager->getSystemPrivateKey(); - - $privateKey = $this->crypt->decryptPrivateKey($encryptedKey, - $recoveryPassword); - - $this->recoverAllFiles('/', $privateKey); - } - - /** * @param string $uid * @return bool */ |