Self check: Patron login fails when username different than barcode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Evergreen 2.7.5
OpenSRF 2.4
Patrons are able to login through a selfcheck station with no apparent issue when the barcode/username are equal. However, if a patron with barcode: 278000000000000 and username: bmills attempts to login with their barcode the selfcheck fails the login session. If the patron logs in with their username, the session succeeds and checkout can continue.
I'm not sure, but I think this could be due to the selfcheck treating both the barcode/username as a username during authentication. The selfcheck.js file seems to only count a login as a barcode if it passes a regex test. If no regex is set for barcodes, then it gets labeled a usrname:
-- excerpts from selfcheck.js --
if (barcode_
console.
barcode = barcode_or_usrname;
} else {
console.
usrname = barcode_or_usrname;
}
When fetching the patron, it seems to look at:
SelfCheckManage
var patron_id = fieldmapper.
['open-ils.actor', 'open-ils.
{params : [this.authtoken, barcode, usrname]}
Not a big deal when they're the same. However, if everything is coming out as username when no regex is set, the lookup fails when they're different:
Example Log:
- osrf_http_
- osrf_http_
summary: |
- Self ficheck: Patron login fails when username different than barcode + Self check: Patron login fails when username different than barcode |
Changed in evergreen: | |
status: | New → Invalid |