From: Terran McCanna Date: Mon, 6 Jun 2016 17:38:32 +0000 (-0400) Subject: LP#1528647 Self-check only accepts user name value if regex for barcode X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=08138f02cb9ce60b884b1e9e432ae02c7a697773;p=evergreen%2Fpines.git 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 --- 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();