Bug 21533

Summary: Do not allow password recovery for administrative locked patrons (see 21336)
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 21336    
Bug Blocks:    
Attachments: Bug 21533: Do not allow password recovery for administrative locked patrons
Bug 21533: Do not allow password recovery for administrative locked patrons
Bug 21533: Do not allow password recovery for administrative locked patrons
Bug 21533: Do not allow password recovery for administrative locked patrons

Description Marcel de Rooy 2018-10-10 12:28:48 UTC

    
Comment 1 Marcel de Rooy 2018-10-10 13:18:12 UTC
Created attachment 80348 [details] [review]
Bug 21533: Do not allow password recovery for administrative locked patrons

Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant.

This is a bit lazy solution (but good enough): The account will not be found
when recovering the password. The user should contact the library. Since
the library chose to lock the account, that seems appropriate.

Test plan:
Select a borrower and set login_attempts to -1. Via mysql command line or
with Koha::Patrons->find(borrowernumber)->lock.
Enable password recovery.
Try to recover password from OPAC. You should fail with 'Not found, contact
the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Owen Leonard 2019-04-26 12:07:03 UTC
Created attachment 88904 [details] [review]
Bug 21533: Do not allow password recovery for administrative locked patrons

Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant.

This is a bit lazy solution (but good enough): The account will not be found
when recovering the password. The user should contact the library. Since
the library chose to lock the account, that seems appropriate.

Test plan:
Select a borrower and set login_attempts to -1. Via mysql command line or
with Koha::Patrons->find(borrowernumber)->lock.
Enable password recovery.
Try to recover password from OPAC. You should fail with 'Not found, contact
the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Bouzid Fergani 2019-04-26 19:52:13 UTC
Created attachment 88967 [details] [review]
Bug 21533: Do not allow password recovery for administrative locked patrons

Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant.

This is a bit lazy solution (but good enough): The account will not be found
when recovering the password. The user should contact the library. Since
the library chose to lock the account, that seems appropriate.

Test plan:
Select a borrower and set login_attempts to -1. Via mysql command line or
with Koha::Patrons->find(borrowernumber)->lock.
Enable password recovery.
Try to recover password from OPAC. You should fail with 'Not found, contact
the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Comment 4 Martin Renvoize (ashimema) 2019-05-01 09:21:47 UTC
Created attachment 89159 [details] [review]
Bug 21533: Do not allow password recovery for administrative locked patrons

Depends on bug 21336 for the ADMINISTRATIVE_LOCKOUT constant.

This is a bit lazy solution (but good enough): The account will not be found
when recovering the password. The user should contact the library. Since
the library chose to lock the account, that seems appropriate.

Test plan:
Select a borrower and set login_attempts to -1. Via mysql command line or
with Koha::Patrons->find(borrowernumber)->lock.
Enable password recovery.
Try to recover password from OPAC. You should fail with 'Not found, contact
the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2019-05-01 09:22:15 UTC
Simple patch that works well. Passing QA
Comment 6 Marcel de Rooy 2019-05-01 10:53:44 UTC
Thx Owen, Bouzid and Martin
Comment 7 Nick Clemens (kidclamp) 2019-05-10 12:24:59 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize (ashimema) 2019-05-17 13:31:40 UTC
Enhancement will not be backported to 18.11.x series.