|
Description
Martin Renvoize (ashimema)
2024-12-21 15:18:33 UTC
Created attachment 175882 [details] [review] Bug 38769: Display plugin consents on self registration Created attachment 175883 [details] [review] Bug 38769: Display plugin consents on self registration Work in progress.. currently this patch just displays consent options and doesn't record them against the self-registered user yet. Created attachment 192311 [details] [review] Bug 38769: Add consents column to borrower_modifications Add a new 'consents' column to the borrower_modifications table to store JSON-encoded plugin consents during self-registration when email verification is enabled. This allows plugin consents to be stored alongside other patron data during the email verification workflow and processed after the patron verifies their email address. Created attachment 192312 [details] [review] Bug 38769: Update DBIC schema for consents column Add the 'consents' column definition to the BorrowerModification DBIC schema class to match the database table change. Created attachment 192313 [details] [review] Bug 38769: Process consents on patron self-registration This patch adds support for plugin consent types to self-registration: - Add proper display of plugin consents with consent_[type] naming - Only show plugin consents for new registrations (not edit mode) Backend changes (opac-memberentry.pl): - Add ParsePluginConsents() to extract consent checkbox values - Save plugin consents when creating patron directly - Store consents as JSON for email verification workflow Email verification (opac-registration-verify.pl): - Process stored plugin consents after email verification - Create Koha::Patron::Consent records for each agreed consent Test plan: 1. Enable a plugin that provides patron_consent_type hook 2. Go to OPAC self-registration page 3. Verify plugin consents are displayed 4. Submit registration with/without email verification 5. Verify consents are saved to patron_consents table Created attachment 192314 [details] [review] Bug 38769: (follow-up) Exclude consents from approve() method The approve() method in Koha::Patron::Modification is used for staff approval of patron profile updates. Since the 'consents' field is specific to self-registration and is handled separately in opac-registration-verify.pl, we need to explicitly delete it from the data hash to prevent any potential issues. This matches the pattern used for extended_attributes. |