https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36536

--- Comment #3 from CJ Lynce <[email protected]> ---
Created attachment 185532
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185532&action=edit
Bug 36536: Make REST APIs validateUserAndPassword update borrowers.lastseen

This patch added the option to update borrowers.lastseen when a patron username
    and password is verified via the REST API. This can be enabled or disabled
    selectively using the TrackLastPatronActivityTriggers system preference
    using the [ ] Patron authentication via API option..

To test:
1. Create a new user, ensuring to set the Username and password fields.
    *Import to do this first*
2. Edit the TrackLastPatronActivityTriggers syspref and check 'login
3. Ensure the RESTBasicAuth syspref is set to Enable.
4. Check the lastseen date of your new user using a SQL report
    SELECT borrowernumber, userid, lastseen FROM borrowers WHERE userid =
'USERNAME'
    (Replace USERNAME with your chosen username for the new patron)
5. The lastseen for your new user should be null
6. Run the attached api_verify_lastseen.pl test script
    **Change P_USERNAME and P_PASSWORD to the username and password of your new
user.
    (script contains expected output for successful verification)
7. Re-check the lastseen date of your new user again via SQL (step 4)
    The lastseen should still be null.

8. Apply Patch

9. Edit the TrackLastPatronActivityTriggers syspref and check the '[ ] Patron
authentication via API' option
10. Rerun the api_verify_lastseen.pl
11. Re-check the lastseen date of your new user again via SQL (step 4)
    The lastseen should now be updated to the time of the last script run.

For good measure:
12. Edit the TrackLastPatronActivityTriggers syspref and **UNcheck** the '[ ]
Patron authentication via API' option
13. Rerun the api_verify_lastseen.pl
14. Re-check the lastseen date of your new user again via SQL (step 4)
    The lastseen should have remained the same as previous.

Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to