Bug 10667 - ILS-DI: AuthenticatePatron should also work with cardnumber
Summary: ILS-DI: AuthenticatePatron should also work with cardnumber
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-31 11:47 UTC by Katrin Fischer
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

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


Attachments
Bug 10667: Add unit tests for ILSDI::Services::AuthenticatePatron (4.47 KB, patch)
2013-09-08 19:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10667: Allow authentication with cardnumber for ILS-DI (3.69 KB, patch)
2013-09-08 19:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10667: Add unit tests for ILSDI::Services::AuthenticatePatron (4.59 KB, patch)
2013-09-08 21:29 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10667: Allow authentication with cardnumber for ILS-DI (4.01 KB, patch)
2013-09-08 21:29 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 10667: Follow up - prevent t/00-load from failing (1015 bytes, patch)
2013-09-12 05:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10667: Follow up - prevent t/00-load from failing (1.18 KB, patch)
2013-09-12 11:48 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 10667: Add unit tests for ILSDI::Services::AuthenticatePatron (4.66 KB, patch)
2013-09-13 02:12 UTC, Mason James
Details | Diff | Splinter Review
Bug 10667: Allow authentication with cardnumber for ILS-DI (4.08 KB, patch)
2013-09-13 02:13 UTC, Mason James
Details | Diff | Splinter Review
Bug 10667: Follow up - prevent t/00-load from failing (1.26 KB, patch)
2013-09-13 02:13 UTC, Mason James
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-07-31 11:47:52 UTC
.../cgi-bin/koha/ilsdi.pl?service=Describe&verb=AuthenticatePatron

Currently only username + password is supported. Authentication should also be possible with cardnumber + password to match OPAC authentication.
Comment 1 Katrin Fischer 2013-09-08 19:49:16 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2013-09-08 19:49:26 UTC Comment hidden (obsolete)
Comment 3 Bernardo Gonzalez Kriegel 2013-09-08 21:29:42 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2013-09-08 21:29:52 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2013-09-12 04:55:34 UTC
Hm, I think I have to fail this - it looks like my adding use Auth; to Services.pm breaks the packaging process.
Comment 6 Katrin Fischer 2013-09-12 05:40:58 UTC Comment hidden (obsolete)
Comment 7 Bernardo Gonzalez Kriegel 2013-09-12 11:48:10 UTC Comment hidden (obsolete)
Comment 8 Mason James 2013-09-13 02:12:50 UTC
Created attachment 21064 [details] [review]
Bug 10667: Add unit tests for ILSDI::Services::AuthenticatePatron

This patch adds unit tests for Authenticate patron.

To test:
- Run perl t/db_dependent/ILSDI_Services.t
- Verify all tests pass

Note: there are some tests marked as TODO.

Rewriting AuthenticatePatron to make cardnumber and userid
work for authenticating a patron will be implemented in the
next patch. Tests related to this are currently showing as
'not ok', but are still passing.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors
With both patches applied, all test pass.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 9 Mason James 2013-09-13 02:13:09 UTC
Created attachment 21065 [details] [review]
Bug 10667: Allow authentication with cardnumber for ILS-DI

Test authentication via ILS-DI:
- with userid and password
- with userid and wrong password
- with cardnumber and password
- with cardnumber and wrong password
...

Before the patch only userid will authenticate the patron.
After the patch was applied, userid and cardnumber will work.

To test:
- Run t/db_dependent/ILSDI_Services.t - all tests should pass.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors

Test:
Enable ISL-DI
access opac with /cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=XXX&password=YYY
With userid/cardnumber & password returns borrowernumber
With userid/cardnumber & wrong password returns PatronNotFound
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 10 Mason James 2013-09-13 02:13:28 UTC
Created attachment 21067 [details] [review]
Bug 10667: Follow up - prevent t/00-load from failing

To test:
- Apply first 2 patches for unit tests and changes to Services.pm
- Turn off mysql
- Run t/00-load.t
- Verify that the test fails.
- Apply this third patch.
- Run t/00-load.t again.
- Verify this time it passes.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work well, no koha-qa errors.

Without third patch and mysql down, test fails,
with third patch it succeed.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 11 Mason James 2013-09-13 02:15:27 UTC
patches pass all ./t/tests and qa-tool
passing QA on 3 patches
Comment 12 Galen Charlton 2013-09-16 19:17:05 UTC
Pushed to master.  Thanks, Katrin!
Comment 13 Tomás Cohen Arazi 2013-11-08 18:29:46 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Katrin!