From 278c099a5f721b5955aa6869839aec579ce078e5 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Mon, 6 Jun 2016 13:38:32 -0400 Subject: [PATCH] LP#1528647 Self-check only accepts user name value if regex for barcode not set up The original fix only worked if password was not required for self-check. This fix allows it to work when password is required as well. Signed-off-by: Terran McCanna Signed-off-by: Chris Sharp Signed-off-by: Kathy Lussier --- Open-ILS/web/js/dojo/openils/User.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/User.js b/Open-ILS/web/js/dojo/openils/User.js index ef17bf8a29..93a1212485 100644 --- a/Open-ILS/web/js/dojo/openils/User.js +++ b/Open-ILS/web/js/dojo/openils/User.js @@ -124,8 +124,12 @@ if(!dojo._hasResource["openils.User"]) { if (!args.passwd) args.passwd = _u.passwd; if (!args.agent) args.agent = _u.login_agent; if (!args.type) args.type = _u.type; - - var initReq = OpenSRF.CachedClientSession('open-ils.auth').request('open-ils.auth.authenticate.init', args.username); + + if (args.username) { + var initReq = OpenSRF.CachedClientSession('open-ils.auth').request('open-ils.auth.authenticate.init', args.username); + } else { + var initReq = OpenSRF.CachedClientSession('open-ils.auth').request('open-ils.auth.authenticate.init', args.barcode); + } initReq.oncomplete = function(r) { var seed = r.recv().content(); -- 2.11.0