[Bug 44296] New: Warn when changing the userid of a patron used by a SIP account
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Bug ID: 44296 Summary: Warn when changing the userid of a patron used by a SIP account Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When SIP account is created, the value from borrowers.userid is copied into sip_accounts.login_id. If the borrower's userid is later changed, the login_id in the sip account is not updated. This causes SIP requests to fail. To recreate: - create a SIP institution - create a SIP account (on KTD default data, I'm using patron "koha_sip"- adjust username and password values below as needed if not on KTD) - send a SIP request from the commandline: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 -m patron_information - confirm your response succeeds - edit the patron's user_id to "term11" - repeat the SIP request from above: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL --patron 23529001000463 -m patron_information - confirm login fails - send a sip request with the updated userid value: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term11 -sp term1 -l CPL --patron 23529001000463 -m patron_information - confirm login fails When a user edits the userid of a patron used for a SIP account, when should alert them to the resulting SIP request failure. When a user views a SIP account whose login_id does not match an existing userid, we should alert them to the issue. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Warn when changing the |Warn when changing the |userid of a patron used by |userid of a patron used by |a SIP account |a SIP account or when SIP | |account contains a login_id | |matching no patron -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |44235 Blocks| |44292 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 [Bug 44235] Warn when patron used for SIP2 account lacks sip_client permission https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44292 [Bug 44292] OMNIBUS: SIP2 administration interface improvements -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43465 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43465 [Bug 43465] Patrons linked to SIP2 accounts should have a badge -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|43465 | Depends on| |43465 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43465 [Bug 43465] Patrons linked to SIP2 accounts should have a badge -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 212636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212636&action=edit Bug 44296: Warn when a SIP2 account's login_id stops matching a patron A SIP2 account logs in with the patron whose userid matches the account's login_id. If that patron's userid is changed, the account's login_id is not, and SIP2 clients can no longer log in with either the old or the new username. This patch warns staff about it in both places: - On the patron edit form and the change username/password form, when the patron's userid is the login of a SIP2 account, changing the username shows a warning that SIP2 clients will not be able to log in with that account until its login is updated. Staff with manage_sip2 get a link to the account. - The SIP2 account view and edit form show a warning when no patron has the account's login_id as their userid. On the edit form, the warning goes away once the staff userid is changed. - BaseResource gets a form-header slot, like the show-header one, so resources can add content to the top of their add/edit form The existing "You will be logged out" hints on those forms now only remove their own hint, and the random password link on the change username/password form is placed after the password hint explicitly. Test plan: 1. Apply patch, yarn build, restart_all 2. Administration > SIP2: create an institution and an account whose staff userid is an existing patron's userid 3. Edit that patron (Edit > OPAC/Staff interface login). Change the username: confirm a warning appears below it, naming and linking to the SIP2 account. Put the username back: the warning goes away 4. More > Change username: repeat step 3 on the New username field. Confirm the "Click to fill with a randomly generated suggestion" link is still below the password hint 5. Log in as a staff user without manage_sip2 who can edit patrons, repeat step 3: the warning shows without a link 6. Edit a patron with no SIP2 account, change the username: no warning 7. Change the SIP2 account patron's username and save 8. View the SIP2 account: confirm a warning that no patron has that userid and SIP2 clients will not be able to log in 9. Edit the account: confirm the same warning shows on the edit form. Remove the staff userid: the warning goes away 10. Select the patron (by the new username), save: the warning is gone from the account view 11. Send a SIP request with the new username and confirm login works: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su <new userid> -sp <password> -l CPL --patron 23529001000463 -m patron_information 12. yarn cypress run --spec t/cypress/integration/SIP2/Accounts.ts,t/cypress/integration/Patron/SIP2AccountUserid_spec.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44299 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44299 [Bug 44299] Prompt user to add sip_client permission when creating a SIP account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |44228 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44228 [Bug 44228] Add option on patron account page to create SIP account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|43465, 44235 |44212 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43465 [Bug 43465] Patrons linked to SIP2 accounts should have a badge https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 [Bug 44212] Link to SIP patron in SIP account https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44235 [Bug 44235] Warn when patron used for SIP2 account lacks sip_client permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212636|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44296 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 212663 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212663&action=edit Bug 44296: Warn when a SIP2 account's login_id stops matching a patron A SIP2 account logs in with the patron whose userid matches the account's login_id. If that patron's userid is changed, the account's login_id is not, and SIP2 clients can no longer log in with either the old or the new username. This patch warns staff about it in both places: - On the patron edit form and the change username/password form, when the patron's userid is the login of a SIP2 account, changing the username shows a warning that SIP2 clients will not be able to log in with that account until its login is updated. Staff with manage_sip2 get a link to the account. - The SIP2 account view and edit form show a warning when no patron has the account's login_id as their userid. On the edit form, the warning goes away once the staff userid is changed. - BaseResource gets a form-header slot, like the show-header one, so resources can add content to the top of their add/edit form The existing "You will be logged out" hints on those forms now only remove their own hint, and the random password link on the change username/password form is placed after the password hint explicitly. Test plan: 1. Apply patch, yarn build, restart_all 2. Administration > SIP2: create an institution and an account whose staff userid is an existing patron's userid 3. Edit that patron (Edit > OPAC/Staff interface login). Change the username: confirm a warning appears below it, naming and linking to the SIP2 account. Put the username back: the warning goes away 4. More > Change username: repeat step 3 on the New username field. Confirm the "Click to fill with a randomly generated suggestion" link is still below the password hint 5. Log in as a staff user without manage_sip2 who can edit patrons, repeat step 3: the warning shows without a link 6. Edit a patron with no SIP2 account, change the username: no warning 7. Change the SIP2 account patron's username and save 8. View the SIP2 account: confirm a warning that no patron has that userid and SIP2 clients will not be able to log in 9. Edit the account: confirm the same warning shows on the edit form. Remove the staff userid: the warning goes away 10. Select the patron (by the new username), save: the warning is gone from the account view 11. Send a SIP request with the new username and confirm login works: ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su <new userid> -sp <password> -l CPL --patron 23529001000463 -m patron_information 12. yarn cypress run --spec t/cypress/integration/SIP2/Accounts.ts,t/cypress/integration/Patron/SIP2AccountUserid_spec.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Barbara Johnson <Barbara.Johnson@bedfordtx.gov> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org