-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: support -n option to encrypt-all command to allow to run in non-interactive mode #56419
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
fix: support -n option to encrypt-all command to allow to run in non-interactive mode #56419
Conversation
…interactive mode Signed-off-by: yemkareems <yemkareems@gmail.com>
artonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's going in the good direction :).
Don't forget the other question that comes later.
…run encryption non-interactive only when -n option is present Signed-off-by: yemkareems <yemkareems@gmail.com>
artonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also that question:
server/apps/encryption/lib/Crypto/EncryptAll.php
Lines 281 to 285 in f6fe536
| $question = new ConfirmationQuestion('Do you want to send the passwords directly to the users by mail? (y/n) ', false); | |
| if ($this->questionHelper->ask($this->input, $this->output, $question)) { | |
| $this->sendPasswordsByMail(); | |
| } | |
| } |
…non-interactive mode sent the password directly Signed-off-by: yemkareems <yemkareems@gmail.com>
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option --no-interaction is provided by symfony for all console commands.
So the only thing you need to do is to remove the warning to prevent non-interactive input. Ideally make sure to only remove the warning if the option is passed.
…ault answer to both questions true to support -n run directly Signed-off-by: yemkareems <yemkareems@gmail.com>
artonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good beside nitpick
Signed-off-by: yemkareems <yemkareems@gmail.com>
Signed-off-by: yemkareems <yemkareems@gmail.com>
possible options now are
occ encryption:encrypt-all
will ask the confirmation question before proceeding with encryption
occ encryption:encrypt-all -n
will not ask the question and run the encryption directly
Summary
TODO
Checklist
3. to review, feature component)stable32)