Skip to content

Commit

Permalink
Merge pull request #39395 from owncloud/text-of-encryption-commands
Browse files Browse the repository at this point in the history
Adjust text of occ encryption command messages
  • Loading branch information
phil-davis authored Oct 22, 2021
2 parents 1bd007d + 924f7b8 commit e871c2a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/39395
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Adjust text of occ encryption command messages

The text of some encryption command messages has been improved.

https://github.com/owncloud/core/pull/39395
4 changes: 2 additions & 2 deletions core/Command/Encryption/DecryptAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected function configure() {
$this->setHelp(
'This will disable server-side encryption and decrypt all files for '
. 'all users if it is supported by your encryption module. '
. 'Please make sure that no user access his files during this process!'
. 'Please make sure that no user accesses their files during this process!'
);
$this->addArgument(
'user',
Expand Down Expand Up @@ -161,7 +161,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$output->writeln("You are about to start to decrypt all files stored in $message.");
$output->writeln('It will depend on the encryption module and your setup if this is possible.');
$output->writeln('Depending on the number and size of your files this can take some time');
$output->writeln('Please make sure that no user access his files during this process!');
$output->writeln('Please make sure that no user accesses their files during this process!');
$output->writeln('');
$question = new ConfirmationQuestion('Do you really want to continue? (y/n) ', false);
if (($confirmed === 'yes') || $this->questionHelper->ask($input, $output, $question)) {
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Encryption/Disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$hasEncryptedFiles = (bool) $results->fetchColumn(0);
$results->closeCursor();
if ($hasEncryptedFiles !== false) {
$output->writeln('<info>The system still have encrypted files. Please decrypt them all before disabling encryption.</info>');
$output->writeln('<info>The system still has encrypted files. Please decrypt them all before disabling encryption.</info>');
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion core/Command/Encryption/EncryptAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function configure() {
$this->setDescription('Encrypt all files for all users.');
$this->setHelp(
'This will encrypt all files for all users. '
. 'Please make sure that no user access his files during this process!'
. 'Please make sure that no user accesses their files during this process!'
);
$this->addOption(
'yes',
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Command/Encryption/DisableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function testDisable($oldStatus, $isUpdating, $masterKeyEnabled, $hasEncr
} else {
$this->consoleOutput->expects($this->once())
->method('writeln')
->with($this->stringContains('<info>The system still have encrypted files. Please decrypt them all before disabling encryption.</info>'));
->with($this->stringContains('<info>The system still has encrypted files. Please decrypt them all before disabling encryption.</info>'));
$expectedExitCode = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/cliEncryption/encryption.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Feature: encryption command
Given the administrator has uploaded file with content "uploaded content" to "/lorem.txt"
When the administrator disables encryption using the occ command
Then the command should have failed with exit code 1
And the command output should contain the text "The system still have encrypted files. Please decrypt them all before disabling encryption."
And the command output should contain the text "The system still has encrypted files. Please decrypt them all before disabling encryption."


Scenario: move encryption keys to a different folder
Expand All @@ -68,4 +68,4 @@ Feature: encryption command
Given the administrator has decrypted everything
When the administrator disables encryption using the occ command
Then the command should have failed with exit code 1
And the command output should contain the text "The system still have encrypted files. Please decrypt them all before disabling encryption"
And the command output should contain the text "The system still has encrypted files. Please decrypt them all before disabling encryption"

0 comments on commit e871c2a

Please sign in to comment.