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.
@@ -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
@@ -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.schema?be.db.quoteIdent(be.config.login.schema)+'.':'')
1008
- +be.db.quoteIdent(be.config.login.table)+
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.5.0-betha.0",
4
+ "version": "2.5.0-betha.1",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",