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.