From bf82015254941a74dfcd00d8b509a2f2a0734904 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Mon, 5 Oct 2015 12:40:01 +0200
Subject: [PATCH] add some output to explain the pre-conditions for decrypt-all

---
 apps/encryption/lib/crypto/decryptall.php | 6 ++++++
 lib/private/encryption/decryptall.php     | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/apps/encryption/lib/crypto/decryptall.php b/apps/encryption/lib/crypto/decryptall.php
index d7cd422c5e..1daf3699d1 100644
--- a/apps/encryption/lib/crypto/decryptall.php
+++ b/apps/encryption/lib/crypto/decryptall.php
@@ -84,6 +84,9 @@ class DecryptAll {
 		$recoveryKeyId = $this->keyManager->getRecoveryKeyId();
 
 		if (!empty($user)) {
+			$output->writeln('You can only decrypt the users files if you know');
+			$output->writeln('the users password or if he activated the recovery key.');
+			$output->writeln('');
 			$questionUseLoginPassword = new ConfirmationQuestion(
 				'Do you want to use the users login password to decrypt all files? (y/n) ',
 				false
@@ -98,6 +101,9 @@ class DecryptAll {
 				$user = $recoveryKeyId;
 			}
 		} else {
+			$output->writeln('You can only decrypt the files of all users if the');
+			$output->writeln('recovery key is enabled by the admin and activated by the users.');
+			$output->writeln('');
 			$user = $recoveryKeyId;
 		}
 
diff --git a/lib/private/encryption/decryptall.php b/lib/private/encryption/decryptall.php
index c1875f16ab..e19ee6b745 100644
--- a/lib/private/encryption/decryptall.php
+++ b/lib/private/encryption/decryptall.php
@@ -119,6 +119,9 @@ class DecryptAll {
 		foreach ($encryptionModules as $moduleDesc) {
 			/** @var IEncryptionModule $module */
 			$module = call_user_func($moduleDesc['callback']);
+			$this->output->writeln('');
+			$this->output->writeln('Prepare "' . $module->getDisplayName() . '"');
+			$this->output->writeln('');
 			if ($module->prepareDecryptAll($this->input, $this->output, $user) === false) {
 				$this->output->writeln('Module "' . $moduleDesc['displayName'] . '" does not support the functionality to decrypt all files again or the initialization of the module failed!');
 				return false;
-- 
GitLab