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=b969b551afc8253f97c3a85b1b7783e857f70dc8;p=contrib%2FConifer.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 Signed-off-by: Chris Sharp Signed-off-by: Kathy Lussier --- 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();