backend-plus 2.5.2-betha.4 → 2.5.2-betha.6

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.
@@ -2950,7 +2950,7 @@ AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(pa
2950
2950
  }
2951
2951
  lines.push(`
2952
2952
  create or replace function set_app_user(p_user text) returns text
2953
- secirotu definer volatile language plpgsql
2953
+ security definer volatile language plpgsql
2954
2954
  as
2955
2955
  $body$
2956
2956
  declare
@@ -2966,8 +2966,11 @@ begin
2966
2966
  else
2967
2967
  select ${be.config.login.infoFieldList.map(fieldName => db.quoteIdent(fieldName)).join(', ')}
2968
2968
  into ${be.config.login.infoFieldList.map(fieldName => db.quoteIdent('v_'+fieldName)).join(', ')}
2969
- from usuarios u left join personas p using (idper)
2970
- where u."usuario" = p_user;
2969
+
2970
+ from ${(be.config.login.from ?? (
2971
+ (be.config.login.schema?be.db.quoteIdent(be.config.login.schema)+'.':'')+
2972
+ be.db.quoteIdent(be.config.login.table)))}
2973
+ where ${db.quoteIdent(be.config.login.userFieldName)} = p_user;
2971
2974
  ${be.config.login.infoFieldList.map(fieldName => `
2972
2975
  perform set_config('backend_plus._${fieldName}', v_${fieldName}, false);`).join('')}
2973
2976
 
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.2-betha.4",
4
+ "version": "2.5.2-betha.6",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",