Bug 21992 - Remove Koha::Patron::update_password
Summary: Remove Koha::Patron::update_password
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 21178 22048
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-12 16:35 UTC by Tomás Cohen Arazi
Modified: 2020-01-06 20:14 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21992: Use ->set_password in onboarding.pl (902 bytes, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Use ->set_password in member-password.pl (6.32 KB, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Use set_password in memberentry.pl (1.30 KB, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Remove use of update_password in create_superlibrarian.pl (947 bytes, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Use set_password opac/opac-password-recovery.pl (1.90 KB, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Remove uses of update_password in tests (7.44 KB, patch)
2018-12-26 15:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Remove unused Koha::Patron->update_password method (4.55 KB, patch)
2018-12-26 16:28 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 21992: Remove unused Koha::Patron->update_password method (4.62 KB, patch)
2019-01-02 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 21992: Remove unused Koha::Patron->update_password method (4.64 KB, patch)
2019-01-02 20:39 UTC, Josef Moravec
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 2018-12-12 16:35:50 UTC
With 21178, we should be using set_password everywhere instead.
Comment 1 Tomás Cohen Arazi 2018-12-26 15:50:30 UTC
Created attachment 83494 [details] [review]
Bug 21992: Use ->set_password in onboarding.pl

To test, verify the onboarding process sets the password correctly.
Comment 2 Tomás Cohen Arazi 2018-12-26 15:50:33 UTC
Created attachment 83495 [details] [review]
Bug 21992: Use ->set_password in member-password.pl

This patch makes member-password.pl use $patron->set_password instead of
update_password. The side effect is that setting password and userid
become separate steps in the code.

For the password all the initial checks are the same, but password
strength is checked on calling set_password and an exception is thrown.
So instead of checking the password quality, we just wait for exceptions
and behave the same as before.

Bonus: you will notice I reused the initially fetched $patron object.
Things get simpler :-D

To test:
- Verify that changing the password / userid for a patron works as usual
Comment 3 Tomás Cohen Arazi 2018-12-26 15:50:37 UTC
Created attachment 83496 [details] [review]
Bug 21992: Use set_password in memberentry.pl

To test:
- Verify that changing the password and userid of a patron by globally
editing they works,
Comment 4 Tomás Cohen Arazi 2018-12-26 15:50:40 UTC
Created attachment 83497 [details] [review]
Bug 21992: Remove use of update_password in create_superlibrarian.pl

In this case we are not using $patron->set_password, because we want to
keep the current behaviour: no checks on the password quality.
Comment 5 Tomás Cohen Arazi 2018-12-26 15:50:43 UTC
Created attachment 83498 [details] [review]
Bug 21992: Use set_password opac/opac-password-recovery.pl
Comment 6 Tomás Cohen Arazi 2018-12-26 15:50:46 UTC
Created attachment 83499 [details] [review]
Bug 21992: Remove uses of update_password in tests
Comment 7 Tomás Cohen Arazi 2018-12-26 16:28:50 UTC
Created attachment 83500 [details] [review]
Bug 21992: Remove unused Koha::Patron->update_password method

This patch removes the no longer used method.

To test:
- Apply this patch
- Run:
  $ git grep update_password
=> SUCCESS: Only references are in Auth_with_ldap.pm and not related
- Sign off :-D
Comment 8 Kyle M Hall 2019-01-02 14:04:24 UTC
Created attachment 83592 [details] [review]
Bug 21992: Remove unused Koha::Patron->update_password method

This patch removes the no longer used method.

To test:
- Apply this patch
- Run:
  $ git grep update_password
=> SUCCESS: Only references are in Auth_with_ldap.pm and not related
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Josef Moravec 2019-01-02 20:39:45 UTC
Created attachment 83604 [details] [review]
Bug 21992: Remove unused Koha::Patron->update_password method

This patch removes the no longer used method.

To test:
- Apply this patch
- Run:
  $ git grep update_password
=> SUCCESS: Only references are in Auth_with_ldap.pm and not related
- Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 10 Nick Clemens 2019-01-25 20:51:02 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Martin Renvoize 2019-01-31 16:57:41 UTC
Enhancement, will not be backported at this time to 18.11.x series.