Bug 3738 Automate login to web-based self-check system
Some small, single-branch corporate and special libraries use unattended self-checkout stations, and would like to automate the staff login, so that just going to the sco/sco-main.pl URL would bring the self-check up ready for patron use. This patch create three sysprefs, AutoSelfCheckAllowed, and AutoSelfCheckID/AutoSelfCheckPass. If the site wants to allow automated login, staff would then need to create the selfcheck user record and enter that login ID and password into the sysprefs. The kohaclone/opac/sco/sco-main.pl script has been modified to check these sysprefs and pass values (if present and allowed) into the self-check URL. The URL then bypasses the staff login page and comes up ready for checkout, waiting for the first patron barcode. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
ff4d456072
commit
f52c54eb35
|
|
@ -330,6 +330,9 @@ $tabsysprefs{OPACAllowHoldDateInFuture} = "OPAC";
|
|||
$tabsysprefs{OPACPatronDetails} = "OPAC";
|
||||
$tabsysprefs{OPACFinesTab} = "OPAC";
|
||||
$tabsysprefs{DisplayOPACiconsXSLT} = "OPAC";
|
||||
$tabsysprefs{AutoSelfCheckAllowed} = "OPAC";
|
||||
$tabsysprefs{AutoSelfCheckID} = "OPAC";
|
||||
$tabsysprefs{AutoSelfCheckPass} = "OPAC";
|
||||
|
||||
# OPAC
|
||||
$tabsysprefs{SearchMyLibraryFirst} = "OPAC";
|
||||
|
|
|
|||
|
|
@ -279,3 +279,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
|
|||
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' );
|
||||
INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limit images stored in the database by the Patron Card image manager to this number.','Integer');
|
||||
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SpineLabelShowPrintOnBibDetails', '0', '', 'If turned on, a "Print Label" link will appear for each item on the bib details page in the staff interface.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('AutoSelfCheckAllowed', '0', 'For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.', '', 'YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea');
|
||||
|
|
|
|||
|
|
@ -282,3 +282,6 @@ INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limiter le nombre d''i
|
|||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','Si désactivé, l''affichage détaillé des données adhérents est désactivé à l''OPAC.','','YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','Si désactivé, l''onglet Amende est désactivé à l''OPAC.','','YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SpineLabelShowPrintOnBibDetails', '0', '', 'If turned on, a "Print Label" link will appear for each item on the bib details page in the staff interface.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('AutoSelfCheckAllowed', '0', 'Pour les bibliothèques d''entreprise qui veulent du prêt auto-contrôlé de n''importe quel PC sans le besoin de recourir à un login de bibliothécaire.', '', 'YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Identifiant Bibliothécaire avec droits de circulation qui sera utilisé pour les prêt auto-contré. Ne s''applique que dans les cas de l''activation de la préférence AutoSelfCheckout.','70|10','Textarea');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Mot de passe utilisé pour le prêt autocontrôlé. Ne s''applique que dans le cas de l''activation de la préférence AutoSelfCheckout.','70|10','Textarea');
|
||||
|
|
|
|||
|
|
@ -239,3 +239,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
|
|||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MergeAuthoritiesOnUpdate', '1', 'if ON, Updating authorities will automatically updates biblios',NULL,'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowNotForLoanOverride', '0', 'if ON, enables the librarian to choose when they want to check out a notForLoan regular item',NULL,'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo');
|
||||
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('AutoSelfCheckAllowed', '0', 'For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.', '', 'YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea');
|
||||
|
|
|
|||
|
|
@ -3412,6 +3412,26 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = '3.01.00.062';
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('AutoSelfCheckAllowed', '0', 'For corporate and special libraries which want web-based self-check available from any PC without the need for a manual staff login. Most libraries will want to leave this turned off. If on, requires self-check ID and password to be entered in AutoSelfCheckID and AutoSelfCheckPass sysprefs.', '', 'YesNo')");
|
||||
print "Upgrade to $DBversion done ( Added AutoSelfCheckAllowed system preference )\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = '3.01.00.063';
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckID','','Staff ID with circulation rights to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea')");
|
||||
print "Upgrade to $DBversion done ( Added AutoSelfCheckID system preference )\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = '3.01.00.064';
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AutoSelfCheckPass','','Password to be used for automatic web-based self-check. Only applies if AutoSelfCheckAllowed syspref is turned on.','70|10','Textarea')");
|
||||
print "Upgrade to $DBversion done ( Added AutoSelfCheckPass system preference )\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ use C4::Biblio;
|
|||
use C4::Items;
|
||||
|
||||
my $query = new CGI;
|
||||
if (C4::Context->preference('AutoSelfCheckAllowed'))
|
||||
{
|
||||
my $AutoSelfCheckID = C4::Context->preference('AutoSelfCheckID');
|
||||
my $AutoSelfCheckPass = C4::Context->preference('AutoSelfCheckPass');
|
||||
$query->param(-name=>'userid',-values=>[$AutoSelfCheckID]),
|
||||
$query->param(-name=>'password',-values=>[$AutoSelfCheckPass]),
|
||||
}
|
||||
my ($template, $loggedinuser, $cookie) = get_template_and_user({
|
||||
template_name => "sco/sco-main.tmpl",
|
||||
authnotrequired => 0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue