backend-plus 2.5.2-betha.4 → 2.5.2-betha.5
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.js +5 -3
- package/package.json +1 -1
package/lib/backend-plus.js
CHANGED
|
@@ -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
|
-
|
|
2953
|
+
security definer volatile language plpgsql
|
|
2954
2954
|
as
|
|
2955
2955
|
$body$
|
|
2956
2956
|
declare
|
|
@@ -2966,8 +2966,10 @@ 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
|
|
2970
|
-
|
|
2969
|
+
from ${(be.config.login.from ?? (
|
|
2970
|
+
(be.config.login.schema?be.db.quoteIdent(be.config.login.schema)+'.':'')+
|
|
2971
|
+
be.db.quoteIdent(be.config.login.table)))} u left join personas p using (idper)
|
|
2972
|
+
where u.${db.quoteIdent(be.config.login.userFieldName)} = p_user;
|
|
2971
2973
|
${be.config.login.infoFieldList.map(fieldName => `
|
|
2972
2974
|
perform set_config('backend_plus._${fieldName}', v_${fieldName}, false);`).join('')}
|
|
2973
2975
|
|
package/package.json
CHANGED