Bug 27060 - Allow undoing changes to the password on SMTP config
Summary: Allow undoing changes to the password on SMTP config
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 22343
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-19 18:58 UTC by Tomás Cohen Arazi
Modified: 2020-11-20 13:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 27060: Handle password changes more robustly (3.80 KB, patch)
2020-11-19 19:00 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27060: Handle password changes more robustly (3.86 KB, patch)
2020-11-20 13:33 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2020-11-19 18:58:40 UTC
The only way to undo changes when you are editing, is by writing the "****" string on the input. We should provide a simpler method.
Comment 1 Tomás Cohen Arazi 2020-11-19 19:00:45 UTC
Created attachment 113846 [details] [review]
Bug 27060: Handle password changes more robustly

This patch makes the changes in the password input trigger an event that
marks the password as changed. This way we don't need to compare with
the "****" string in the controller. A convenient link for restoring the
original password is added with a proper description that marks the
password as untouched, also restoring the "****" value.

To test:
1. Apply this patch
2. Have an SMTP server set
3. Open for edition
4. In paralell, have a terminal with
   $ koha-mysql kohadev
   > SELECT * FROM smtp_servers;
=> SUCCESS: The password you chose is there
5. Edit the password, save
=> SUCCESS: The password is there
6. Edit the password, choose to reset it to the one in the DB, save
=> SUCCESS: The password hasn't been changed!
7. Edit the password, put ****. save
=> SUCCESS: The password has been updated to ****
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Martin Renvoize 2020-11-20 13:33:17 UTC
Created attachment 113881 [details] [review]
Bug 27060: Handle password changes more robustly

This patch makes the changes in the password input trigger an event that
marks the password as changed. This way we don't need to compare with
the "****" string in the controller. A convenient link for restoring the
original password is added with a proper description that marks the
password as untouched, also restoring the "****" value.

To test:
1. Apply this patch
2. Have an SMTP server set
3. Open for edition
4. In paralell, have a terminal with
   $ koha-mysql kohadev
   > SELECT * FROM smtp_servers;
=> SUCCESS: The password you chose is there
5. Edit the password, save
=> SUCCESS: The password is there
6. Edit the password, choose to reset it to the one in the DB, save
=> SUCCESS: The password hasn't been changed!
7. Edit the password, put ****. save
=> SUCCESS: The password has been updated to ****
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2020-11-20 13:33:53 UTC
Nice little usability enhancement here.. signing off