Demo: fix3
This commit is contained in:
parent
0a3a45107a
commit
b891d8f516
@ -127,8 +127,8 @@ const authorization = {
|
|||||||
Users.findById (req.body.user) .exec (function (err, entry) {
|
Users.findById (req.body.user) .exec (function (err, entry) {
|
||||||
// If there is a local user AND it has a password associated, test against this, and only this
|
// If there is a local user AND it has a password associated, test against this, and only this
|
||||||
if (entry != null && entry.pwd) {
|
if (entry != null && entry.pwd) {
|
||||||
|
console.info(entry);
|
||||||
if (crypto.checkLocalAuth (entry, req.body.pwd)) {
|
if (crypto.checkLocalAuth (entry, req.body.pwd)) {
|
||||||
console.info(entry.roles);
|
|
||||||
return fillSession (req, entry, entry.roles, returnSession);
|
return fillSession (req, entry, entry.roles, returnSession);
|
||||||
}
|
}
|
||||||
return returnError ();
|
return returnError ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user