From 92b29b88c213b7ef6ebbecacc7db896a901880d3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 27 Dec 2017 12:24:36 -0300 Subject: [PATCH] Bug 15492: New sysprefs and permissions In order to make this module unrelated to the SCO module, this patch introduces the following sysprefs: - SelfCheckInMainUserBlock - SelfCheckInModuleUserID - SelfCheckInTimeout - SelfCheckInUserCSS - SelfCheckInUserJS It also adds a new user flag and sub-permission: - self_check => self_checkin_module and moves the circulate => self_checkout permission into - self_check => self_checkout_module Descriptions are adjusted accordingly. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart --- .../data/mysql/atomicupdate/bug_15492.perl | 62 ++++++++++++++++++- installer/data/mysql/sysprefs.sql | 4 ++ installer/data/mysql/userflags.sql | 3 +- installer/data/mysql/userpermissions.sql | 5 +- .../prog/en/includes/permissions.inc | 9 ++- .../admin/preferences/circulation.pref | 20 ++++++ 6 files changed, 95 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_15492.perl b/installer/data/mysql/atomicupdate/bug_15492.perl index f4678074fc..54d37bcd8c 100644 --- a/installer/data/mysql/atomicupdate/bug_15492.perl +++ b/installer/data/mysql/atomicupdate/bug_15492.perl @@ -1,10 +1,68 @@ $DBversion = 'XXX'; if( CheckVersion( $DBversion ) ) { - $dbh->do(q| + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('SelfCheckInMainUserBlock', '', '70|10', 'Add a block of HTML that will display on the self check-in screen.', 'Textarea'); + }); + + $dbh->do(q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'); - |); + }); + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('SelfCheckInModuleUserID', NULL, NULL, 'Patron ID (borrowernumber) to be allowed on the self-checkin module.', 'Integer'); + }); + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('SelfCheckInTimeout', 120, NULL, 'Define the number of seconds before the self check-in module times out.', 'Integer'); + }); + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('SelfCheckInUserCSS', '', NULL, 'Add CSS to be included in the self check-in module in an embedded