From bd9be31e1f556535315bba2f77d34a96d53f6cb2 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 00000000000..c3d53c045f5 --- /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 7f35027dc54..0e3c447e18d 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -329,6 +329,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ILLModuleDisclaimerByType','','','YAML defining disclaimer settings for each ILL request type','Textarea'), ('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 f88d7b58eb9..1b4916debc2 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 @@ -48,6 +48,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