From 3ffad724e6c02dc4aa13df2648b5258aead6d137 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 16 Apr 2024 14:06:01 +0000 Subject: [PATCH] Bug 36197: Add ILLOpacUnauthenticatedRequest sys pref Signed-off-by: David Nind --- installer/data/mysql/atomicupdate/bug_36197.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../admin/preferences/interlibrary_loans.pref | 7 +++++++ 3 files changed, 22 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_36197.pl diff --git a/installer/data/mysql/atomicupdate/bug_36197.pl b/installer/data/mysql/atomicupdate/bug_36197.pl new file mode 100755 index 0000000000..c3d53c045f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36197.pl @@ -0,0 +1,14 @@ +use Modern::Perl; +return { + bug_number => "36197", + description => "Add new ILLOpacUnauthenticatedRequest system preferences", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('ILLOpacUnauthenticatedRequest','',NULL,'Can OPAC users place ILL requests without having to be logged in','YesNo'); } + ); + say $out "Added new system preference 'ILLOpacUnauthenticatedRequest'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 6fdf309d48..48cc2add01 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -326,6 +326,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ILLBackends'), ('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'), ('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'), +('ILLOpacUnauthenticatedRequest',NULL,NULL,'Can OPAC users place ILL requests without having to be logged in','YesNo'), ('ILLPartnerCode','IL','','Patrons from this patron category will be used as partners to place ILL requests with','free'), ('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'), ('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref index f99234b8b3..bc74371a0d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/interlibrary_loans.pref @@ -47,6 +47,13 @@ Interlibrary loans: - pref: ILLOpacbackends class: multi - (separated with |). If left empty, all installed backends will be enabled. + - + - pref: ILLOpacUnauthenticatedRequest + default: 0 + choices: + 0: "Don't allow" + 1: Allow + - OPAC users to place ILL requests without having to be logged in. Workflow: - - pref: ILLCheckAvailability -- 2.39.5