Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust text of occ encryption command messages #39395

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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',
@@ -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)) {
2 changes: 1 addition & 1 deletion core/Command/Encryption/Disable.php
Original file line number Diff line number Diff line change
@@ -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;
}

2 changes: 1 addition & 1 deletion core/Command/Encryption/EncryptAll.php
Original file line number Diff line number Diff line change
@@ -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',
2 changes: 1 addition & 1 deletion tests/Core/Command/Encryption/DisableTest.php
Original file line number Diff line number Diff line change
@@ -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;
}

4 changes: 2 additions & 2 deletions tests/acceptance/features/cliEncryption/encryption.feature
Original file line number Diff line number Diff line change
@@ -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
@@ -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"