@saltcorn/server 0.8.8-beta.0 → 0.8.8-beta.2

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/auth/routes.js CHANGED
@@ -224,7 +224,7 @@ const getAuthLinks = (current, noMethods) => {
224
224
  * @param {*} saltcornApp
225
225
  * @param {*} res
226
226
  */
227
- const loginWithJwt = async (email, password, saltcornApp, res) => {
227
+ const loginWithJwt = async (email, password, saltcornApp, res, req) => {
228
228
  const loginFn = async () => {
229
229
  const publicUserLink = getState().getConfig("public_user_link");
230
230
  const jwt_secret = db.connectObj.jwt_secret;
@@ -254,7 +254,7 @@ const loginWithJwt = async (email, password, saltcornApp, res) => {
254
254
  res.json(token);
255
255
  } else {
256
256
  res.json({
257
- alerts: [{ type: "danger", msg: "Incorrect user or password" }],
257
+ alerts: [{ type: "danger", msg: req.__("Incorrect user or password") }],
258
258
  });
259
259
  }
260
260
  } else if (publicUserLink) {
@@ -276,7 +276,7 @@ const loginWithJwt = async (email, password, saltcornApp, res) => {
276
276
  res.json(token);
277
277
  } else {
278
278
  res.json({
279
- alerts: [{ type: "danger", msg: "The public login is deactivated" }],
279
+ alerts: [{ type: "danger", msg: req.__("The public login is deactivated") }],
280
280
  });
281
281
  }
282
282
  };
@@ -986,7 +986,8 @@ router.post(
986
986
  email,
987
987
  password,
988
988
  req.headers["x-saltcorn-app"],
989
- res
989
+ res,
990
+ req
990
991
  );
991
992
  else signup_login_with_user(u, req, res);
992
993
  }
@@ -1099,7 +1100,7 @@ router.get(
1099
1100
  const { method } = req.params;
1100
1101
  if (method === "jwt") {
1101
1102
  const { email, password } = req.query;
1102
- await loginWithJwt(email, password, req.headers["x-saltcorn-app"], res);
1103
+ await loginWithJwt(email, password, req.headers["x-saltcorn-app"], res, req);
1103
1104
  } else {
1104
1105
  const auth = getState().auth_methods[method];
1105
1106
  if (auth) {
package/load_plugins.js CHANGED
@@ -187,7 +187,14 @@ const loadAndSaveNewPlugin = async (plugin, force, noSignalOrDB) => {
187
187
  if (!isRoot && !tenants_unsafe_plugins) {
188
188
  if (plugin.source !== "npm") return;
189
189
  //get allowed plugins
190
- const instore = await Plugin.store_plugins_available();
190
+
191
+ //refresh root store
192
+ await db.runWithTenant(
193
+ db.connectObj.default_schema,
194
+ async () => await Plugin.store_plugins_available()
195
+ );
196
+
197
+ const instore = getRootState().getConfig("available_plugins", []);
191
198
  const safes = instore.filter((p) => !p.unsafe).map((p) => p.location);
192
199
  if (!safes.includes(plugin.location)) return;
193
200
  }
package/locales/en.json CHANGED
@@ -1221,5 +1221,26 @@
1221
1221
  "Error shown to user if uniqueness is violated": "Error shown to user if uniqueness is violated",
1222
1222
  "Protected": "Protected",
1223
1223
  "Set role to access": "Set role to access",
1224
- "User must have this role or higher to update or create field values": "User must have this role or higher to update or create field values"
1224
+ "User must have this role or higher to update or create field values": "User must have this role or higher to update or create field values",
1225
+ "Disable on mobile": "Disable on mobile",
1226
+ "moment.js format specifier": "moment.js format specifier",
1227
+ "Primary button": "Primary button",
1228
+ "Secondary button": "Secondary button",
1229
+ "Success button": "Success button",
1230
+ "Danger button": "Danger button",
1231
+ "Primary outline button": "Primary outline button",
1232
+ "Secondary outline button": "Secondary outline button",
1233
+ "Standard": "Standard",
1234
+ "X-Small": "X-Small",
1235
+ "Block": "Block",
1236
+ "Large block": "Large block",
1237
+ "Formula for JavaScript object that will be added to state parameters": "Formula for JavaScript object that will be added to state parameters",
1238
+ "Alignment": "Alignment",
1239
+ "Click to edit?": "Click to edit?",
1240
+ "Format": "Format",
1241
+ "Table Synchronization": "Table Synchronization",
1242
+ "unsynched": "unsynched",
1243
+ "synched": "synched",
1244
+ "Sync information": "Sync information",
1245
+ "Sync information tracks the last modification or deletion timestamp so that the table data can be synchronized with the mobile app": "Sync information tracks the last modification or deletion timestamp so that the table data can be synchronized with the mobile app"
1225
1246
  }