backend-plus 2.5.0-betha.0 → 2.5.0-betha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/backend-plus.d.ts +1 -0
- package/lib/backend-plus.js +4 -2
- package/package.json +1 -1
package/lib/backend-plus.d.ts
CHANGED
|
@@ -414,6 +414,7 @@ export interface AppConfigLogin
|
|
|
414
414
|
{
|
|
415
415
|
schema: string // schema of the user table
|
|
416
416
|
table: string // user table
|
|
417
|
+
from: string // complete expression to get table or join where get the user
|
|
417
418
|
userFieldname: string // fieldname in user table that stores the user name
|
|
418
419
|
passFieldname: string // fieldname in user table that stores the password hash
|
|
419
420
|
rolFieldname: string // fieldname in user table that stores the rol
|
package/lib/backend-plus.js
CHANGED
|
@@ -1004,8 +1004,10 @@ AppBackend.prototype.start = function start(opts){
|
|
|
1004
1004
|
"SELECT "+infoFieldList.map(function(fieldOrPair){ return fieldOrPair.split(' as ').map(function(ident){ return be.db.quoteIdent(ident)}).join(' as '); })+
|
|
1005
1005
|
", "+be.config.login.activeClausule+" as active "+
|
|
1006
1006
|
", "+be.config.login.lockedClausule+" as locked "+
|
|
1007
|
-
" FROM "+(be.config.login.
|
|
1008
|
-
|
|
1007
|
+
" FROM "+(be.config.login.from ?? (
|
|
1008
|
+
(be.config.login.schema?be.db.quoteIdent(be.config.login.schema)+'.':'')+
|
|
1009
|
+
be.db.quoteIdent(be.config.login.table)
|
|
1010
|
+
))+
|
|
1009
1011
|
" WHERE "+be.db.quoteIdent(be.config.login.userFieldName)+" = $1 "+
|
|
1010
1012
|
" AND "+be.db.quoteIdent(be.config.login.passFieldName)+" = $2 ",
|
|
1011
1013
|
[username, md5(password+username)]
|
package/package.json
CHANGED