https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39943
--- Comment #15 from Andreas Jonsson <[email protected]> --- Created attachment 200378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200378&action=edit Bug 39943: Change PIN code for OPAC To test: 0. After applying these patches: yarn build koha-upgrade-schema kohadev restart_all 1. Either set system preferences minPasswordLength to 4 and RequireStrongPassword to "Don't require" or replace example passwords in this test plan with conforming passwords. 2. Create a borrower category PIN for testing. 3. Create a borrower with userid 'pintest' i category PIN. Set password '0000'. 4. Verify that it is possible to login to opac with 'pintest'. 5. Set some variables (command line on koha server/docker): instance=kohadev category=PIN patron=pintest su=zippin sp=zippin pincode='0000' password=pintest inst=PINTEST kohabin=/kohadevbox/koha/misc 6. Run migration script: sudo koha-shell -c "perl '$kohabin'/migration_tools/move_pin_codes.pl --category '$category'" "$instance" sudo koha-shell -c "perl '$kohabin'/migration_tools/move_pin_codes.pl --category '$category' --confirm" "$instance" 7. Verify that it is no longer possible to login to OPAC with 'pintest' (because the password hash is moved to the pin field). 8. Enable the system preference 'EnablePinAuthentication'. 9. Create a patron with userid 'zippin' password 'zippin' and give it circulate permissions (to allow it to connect to the SIP-server). 10. Also, set password 'pintest' on the pintest borrower. 11. Go to Koha administration -> Self-service circulation (SIP2) -> Institutions and add an institution with name 'PINTEST'. 12. Under SIP2 accounts add new account tied to userid 'zippin' and institution 'PINTEST'. 13. Verify that the patron password of 'pintest' is valid (the SIP response SHOULD NOT contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 --port 6001 \ --su "$su" --sp "$sp" --location "$inst" \ --message patron_information \ --patron "$patron" --password "$password" 14. Verify that the pin code for 'pintest' is NOT valid (the SIP response MUST contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 --port 6001 \ --su "$su" --sp "$sp" --location "$inst" \ --message patron_information \ --patron "$patron" --password "$pincode" 15. On the SIP account for 'zippin' select "yes" for the parameter "Allow pin code" and save the settings. Also restart sip server: koha-sip --restart $instance 16. Verify that the pin code for 'pintest' is now valid (the SIP response must NOT contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 \ --port 6001 --su "$su" --sp "$sp" --location "$inst" \ --message patron_information --patron "$patron" \ --password "$pincode" 17. In the staff interface go to the patron 'pintest' and click on 'Change password or PIN' 18. In the fields "New pin" and "Confirm new pin" try inputting some letters, 3 digits, many digits and mismatching "Confirm new pin" and verify that validation errors "Pin code too short", "Pin code must consist of only digits" and "Please enter the same pin code as above" appears. 19. Enter the pin code '1111' into both pin code fields. In a separate tab/browser window, change the system preference MinPinLength to 6. Go back to the previous tab/browser window and click "save" to save the new PIN code. Verify that the there is a validation error when saving. 20. Change "MinPinLength" to 4. And change the pin code for patron 'pintest' to '1111'. 21. Verify that the new pin code 1111 for 'pintest' is now valid (the SIP response must NOT contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 --port 6001 \ --su "$su" --sp "$sp" --location "$inst" \ --message patron_information --patron "$patron" --password 1111 22. Log in to the OPAC with userid/password pintest/pintest. 23. Go to your account and click "Change PIN" in the left menu. 24. In the fields "New PIN code" and "Repeat new PIN code" try inputting some letters, 3 digits, many digits and mismatching "Confirm new pin" and verify that validation errors "Pin code too short", "Pin code must consist of only digits" and "Please enter the same pin code as above" appears. 25. Type the wrong password in the password field, and enter the same pin code in both pincode fields. Press save and verify that there is an error "Your password was entered incorrectly...". Verify that the pin code was not changed (repeat 21.) 26. Enter the pin code '2222' into both pin code fields. In a separate tab/browser window, change the system preference MinPinLength to 6. Go back to the previous tab/browser window and click "save" to save the new PIN code. Verify that the there is a validation error when saving. 27. Change "MinPinLength" to 4. From the OPAC change the pin code for patron 'pintest' to '2222'. 28. Verify that the new pin code 2222 for 'pintest' is now valid (the SIP response must NOT contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 --port 6001 \ --su "$su" --sp "$sp" --location "$inst" \ --message patron_information --patron "$patron" --password 2222 29. Set an email address on the pintest borrower ([email protected]) and set the system preference NotifyPasswordChange to "Notify". 30. Set the pin code to '3333' on the pintest borrower and verify that a "Library account PIN code change notification" was added to the message queue for the borrower. 31. Disable the system preference 'EnablePinAuthentication'. 32. Verify that the pin code is now invalid (SIP response MUST contain the text 'Invalid password') $kohabin/sip_cli_emulator.pl --address 127.0.0.1 --port 6001 \ --su "$su" --sp "$sp" --location "$inst" \ --message patron_information --patron "$patron" --password 3333 Sponsored-by: Bibliotek i Västmanland -- 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/
