@base44-preview/cli 0.0.50-pr.481.dbe6b4f → 0.0.50-pr.481.e4f75d4
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/dist/cli/index.js +5 -2
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -254028,6 +254028,9 @@ function checkRLS(rule, record2, user) {
|
|
|
254028
254028
|
return evaluateCondition(rule, record2, user);
|
|
254029
254029
|
}
|
|
254030
254030
|
function applyFLS(record2, schema10, user, operation) {
|
|
254031
|
+
if (Array.isArray(record2)) {
|
|
254032
|
+
return record2.map((r5) => applyFLS(r5, schema10, user, operation));
|
|
254033
|
+
}
|
|
254031
254034
|
const result = {};
|
|
254032
254035
|
for (const [key2, value] of Object.entries(record2)) {
|
|
254033
254036
|
const rule = schema10.properties[key2]?.rls?.[operation];
|
|
@@ -254361,7 +254364,7 @@ async function createEntityRoutes(db2, logger2, broadcast) {
|
|
|
254361
254364
|
updated_date: now
|
|
254362
254365
|
});
|
|
254363
254366
|
}
|
|
254364
|
-
const inserted = stripInternalFields(await collection.insertAsync(records));
|
|
254367
|
+
const inserted = applyFLS(stripInternalFields(await collection.insertAsync(records)), schema10, currentUser, "read");
|
|
254365
254368
|
emit(appId, entityName, "create", inserted);
|
|
254366
254369
|
res.status(201).json(inserted);
|
|
254367
254370
|
} catch (error48) {
|
|
@@ -260868,4 +260871,4 @@ export {
|
|
|
260868
260871
|
CLIExitError
|
|
260869
260872
|
};
|
|
260870
260873
|
|
|
260871
|
-
//# debugId=
|
|
260874
|
+
//# debugId=F32E631496E2C78D64756E2164756E21
|