add some output to explain the pre-conditions for decrypt-all
This commit is contained in:
parent
f4885f6da3
commit
bf82015254
2 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue