From aadf3ccc746ca2950937cfdeb69fa84fa804acc2 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Thu, 6 Feb 2025 06:04:59 -0700 Subject: [PATCH] DIS-98 correct loading libraries for non-Koha ILSs --- code/web/release_notes/25.02.00.MD | 22 +++++++++++----------- code/web/services/Admin/Libraries.php | 12 +++++++----- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/code/web/release_notes/25.02.00.MD b/code/web/release_notes/25.02.00.MD index 21a822fb59..51402a9430 100644 --- a/code/web/release_notes/25.02.00.MD +++ b/code/web/release_notes/25.02.00.MD @@ -149,18 +149,18 @@ ### Koha Updates - When existing volumes during indexing, only load volumes for the current indexing profile. (*MDN*) -- For libraries that use Koha as their ILS, and use the koha-plugin-newsletter-consent plugin - - Administrator with the permission to edit library settings will be able to toggle on/off the 'Enable ILS-issued consents' setting under the 'Data Protection Regulations' section. (*CZ*) - - if the Koha plugin has not been installed and enabled in Koha, then the 'Enable ILS-issued consents' setting will not appear as it requires the plugin to be installed and enabled. (*CZ*) - - if the Koha plugin is uninstalled or disabled in Koha while 'Enable ILS-issued consents' is toggled on, 'Enable ILS-issued consents' will still display. (*CZ*) +- For libraries that use Koha as their ILS, and use the koha-plugin-newsletter-consent plugin (DIS-98) + - Administrator with the permission to edit library settings will be able to toggle on/off the 'Enable ILS-issued consents' setting under the 'Data Protection Regulations' section. (DIS-98) (*CZ*) + - if the Koha plugin has not been installed and enabled in Koha, then the 'Enable ILS-issued consents' setting will not appear as it requires the plugin to be installed and enabled. (DIS-98) (*CZ*) + - if the Koha plugin is uninstalled or disabled in Koha while 'Enable ILS-issued consents' is toggled on, 'Enable ILS-issued consents' will still display. (DIS-98) (*CZ*) - If 'Enable ILS-issued consents' is enabled: - - the 'Privacy Settings' options will appear in patron side menus. (*CZ*) - - In the self-registration form, under a ‘Privacy’ section, patrons need to see information about the consent types set by their library in Koha. For example, they may be given the opportunity to receive the library’s newsletter. (*CZ*) - - Patrons will be able to choose to opt in, which implies that consent is not assumed by default. (*CZ*) - - Patrons will be able to submit their consent along with their registration form. (*CZ*) - - Patrons will be sent to Koha, where it is stored. (*CZ*) - - Patrons will be able to view and change their consent information (as retrieved from Koha) at any point through the ‘Your Account > Privacy Settings ’ section. (*CZ*) - - If ILS consent is enabled in the Aspen settings, but the Koha plugin is disabled or uninstalled, patron will see an informative message in 'Privacy Settings'. (*CZ*) + - the 'Privacy Settings' options will appear in patron's side menus. (DIS-98) (*CZ*) + - In the self-registration form, under a ‘Privacy’ section, patrons need to see information about the consent types set by their library in Koha. For example, they may be given the opportunity to receive the library’s newsletter. (DIS-98) (*CZ*) + - Patrons will be able to choose to opt in, which implies that consent is not assumed by default. (DIS-98) (*CZ*) + - Patrons will be able to submit their consent along with their registration form. (DIS-98) (*CZ*) + - Patrons will be sent to Koha, where it is stored. (DIS-98) (*CZ*) + - Patrons will be able to view and change their consent information (as retrieved from Koha) at any point through the ‘Your Account > Privacy Settings ’ section. (DIS-98) (*CZ*) + - If ILS consent is enabled in the Aspen settings, but the Koha plugin is disabled or uninstalled, patron will see an informative message in 'Privacy Settings'. (DIS-98) (*CZ*) ### Material Request Updates - Allow some patron types to submit unlimited material requests. (DIS-256) (*MDN*) diff --git a/code/web/services/Admin/Libraries.php b/code/web/services/Admin/Libraries.php index 14521b11a7..9046059ab3 100644 --- a/code/web/services/Admin/Libraries.php +++ b/code/web/services/Admin/Libraries.php @@ -80,11 +80,13 @@ function getObjectStructure($context = ''): array { $catalogDriver = CatalogFactory::getCatalogConnectionInstance(trim($accountProfile->driver), $accountProfile); $consentPluginNames = $catalogDriver->getPluginNamesByMethodName('patron_consent_type'); $anyConsentPluginsEnabled = false; - foreach($consentPluginNames as $pluginName) { - $pluginStatus = $catalogDriver->getPluginStatus($pluginName); - if ($pluginStatus['enabled']) { - $anyConsentPluginsEnabled = true; - break; + if ($consentPluginNames != false) { + foreach ($consentPluginNames as $pluginName) { + $pluginStatus = $catalogDriver->getPluginStatus($pluginName); + if ($pluginStatus['enabled']) { + $anyConsentPluginsEnabled = true; + break; + } } }