From 6c66cc1b02f445eac5dfee9ca4db7d1c11afb7e2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Jul 2022 10:22:06 +0100 Subject: [PATCH] Bug 30979: Add 'OpacTrustedCheckout' preference This patch adds a new 'OpacTrustedCheckout' system preference to govern whether the library allows opac users to check out items to themselves from their OPAC login. Signed-off-by: Silvia Meakins Signed-off-by: Kyle M Hall --- installer/data/mysql/atomicupdate/bug_30979.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/opac.pref | 8 +++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_30979.pl diff --git a/installer/data/mysql/atomicupdate/bug_30979.pl b/installer/data/mysql/atomicupdate/bug_30979.pl new file mode 100644 index 0000000000..cb5b6ce0fb --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30979.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "30979", + description => "Add OPACTrustedCheckout system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('OpacTrustedCheckout', '0', NULL, 'Allow logged in OPAC users to check out to themselves', 'YesNo') + } + ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 5a967c00dd..fca33972fc 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -522,6 +522,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacSuppressionRedirect','1','Redirect the opac detail page for suppressed records to an explanatory page (otherwise redirect to 404 error page)','','YesNo'), ('opacthemes','bootstrap','','Define the current theme for the OPAC interface.','Themes'), ('OpacTopissue','0',NULL,'If ON, enables the \'most popular items\' link on OPAC. Warning, this is an EXPERIMENTAL feature, turning ON may overload your server','YesNo'), +('OpacTrustedCheckout', '0', NULL, 'Allow logged in OPAC users to check out to themselves', 'YesNo'), ('OPACURLOpenInNewWindow','0',NULL,'If ON, URLs in the OPAC open in a new window','YesNo'), ('OPACUserCSS','',NULL,'Add CSS to be included in the OPAC in an embedded