https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44230 --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Design update: the final implementation differs from the original description. 1. Body attribute instead of x-koha-override The request body of this endpoint is not a resource representation (unlike POST /patrons, which is why welcome_yes/welcome_no had to be headers), so the option is now an optional boolean in the body: { "password": "...", "password_2": "...", "notify": true|false } * notify: true -> send PASSWORD_CHANGE even if NotifyPasswordChange is disabled * notify: false -> do not send it, even if NotifyPasswordChange is enabled * omitted -> NotifyPasswordChange decides (current behavior) The notice is still only sent if the password actually changes and the patron has a notice email address. Koha::Patron->set_password gets a matching optional 'notify' parameter. 2. Suppressing the notice is permission-gated and always logged The PASSWORD_CHANGE notice is how patrons find out about unexpected password changes, so silently suppressing it would make account takeovers with leaked integration credentials invisible. Therefore: * notify: false requires the new borrowers.suppress_password_change_notice permission. It is checked early in the controller; otherwise the endpoint returns 403 with error_code 'no_permission_for_notice_suppression'. * Explicit suppression is always recorded in the action logs (MEMBERS / CHANGE PASS, info 'PASSWORD_CHANGE notice suppressed', with the acting user), even if BorrowersLog is disabled. * notify: true needs no extra permission. 3. Endpoint authorization changed to borrowers.edit_borrowers The endpoint used to require the full 'borrowers' module, which implies every borrowers subpermission, so the new permission could never be withheld. It now requires borrowers.edit_borrowers, the same as the staff interface (members/member-password.pl). Note this means staff with only edit_borrowers can now use the endpoint, matching what they can already do in the staff interface. The public (patron self-service) password endpoint is unchanged and does not accept 'notify'. -- You are receiving this mail because: You are watching all bug changes.