From 0465d5f596e4bc3e16b7e9db75a15c43a5b81277 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 15 May 2024 16:27:27 +0000 Subject: [PATCH] Bug 36867: Update preference description and value for libraries using ILS-DI This adds an atomic update to update any libraries with ILS-DI enabled to continue allowing access It also lists the new syntax for allowing all IPs in the preference Signed-off-by: Martin Renvoize --- .../data/mysql/atomicupdate/bug_36867.pl | 22 +++++++++++++++++++ .../admin/preferences/web_services.pref | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_36867.pl diff --git a/installer/data/mysql/atomicupdate/bug_36867.pl b/installer/data/mysql/atomicupdate/bug_36867.pl new file mode 100755 index 00000000000..a8fc4cb283c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36867.pl @@ -0,0 +1,22 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "36867", + description => "Update ILS-DI authorized IPs for existing installations to continue allowing all IPs", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + UPDATE systempreferences SET value = "0:0:0:0/0" WHERE variable = 'ILS-DI:AuthorizedIPs' AND + value = "" AND + EXISTS (SELECT value FROM systempreferences WHERE variable='ILS-DI' AND value = 1); + } + ); + + say $out + "Updated system preference 'ILS-DI:AuthorizedIPs' to allow any IP where ILS-DI enabled and no authorized IPs specified"; + }, +}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref index d5c7c1feb24..8054f5ee248 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref @@ -99,10 +99,10 @@ Web services: 0: Disable - "ILS-DI services for OPAC users (available at: /cgi-bin/koha/ilsdi.pl)" - - - Allow IP addresses + - Allow only IP addresses - pref: ILS-DI:AuthorizedIPs class: Text - - to use the ILS-DI services (when enabled). Separate the IP addresses with commas and without spaces. Leave the field blank to allow any IP address. + - to use the ILS-DI services (when enabled). Separate the IP addresses with commas and without spaces. Enter '0:0:0:0/0' to allow any IP. Mana KB: - - pref: Mana -- 2.46.0