From 51e48f17ca0d30c8d53c1b0a8e157ac51208a369 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 2 Jan 2019 07:21:56 -0500 Subject: [PATCH] LP#1810296: Fix selfcheck patron password setting check Previously, the selfcheck ignored this setting if it was set to "False", since the setting value is stored as text and the truth test always succeeded. Instead, explicitly check that the setting is "True". Signed-off-by: Chris Sharp --- Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js index 9182e440e5..9ecd41df16 100644 --- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js @@ -353,7 +353,7 @@ SelfCheckManager.prototype.drawLoginPage = function() { var bcHandler = function(barcode_or_usrname) { // handle patron barcode/usrname entry - if(self.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { + if(self.orgSettings[SET_PATRON_PASSWORD_REQUIRED] == 'True') { // password is required. wire up the scan box to read it self.updateScanBox({ @@ -395,7 +395,7 @@ SelfCheckManager.prototype.loginPatron = function(barcode_or_usrname, passwd) { usrname = barcode_or_usrname; } - if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED]) { + if(this.orgSettings[SET_PATRON_PASSWORD_REQUIRED] == 'True') { if(!passwd) { // would only happen in dev/debug mode when using the patron= param -- 2.11.0