@saltcorn/server 0.8.5-beta.2 → 0.8.5-beta.4
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/testhelp.js +15 -0
- package/locales/en.json +20 -1
- package/locales/pl.json +1110 -0
- package/package.json +9 -8
- package/public/saltcorn-common.js +44 -8
- package/public/saltcorn.css +23 -0
- package/public/vis-network.min.js +49 -0
- package/routes/admin.js +30 -8
- package/routes/api.js +73 -18
- package/routes/fields.js +11 -1
- package/routes/list.js +8 -5
- package/routes/plugins.js +47 -16
- package/routes/tables.js +104 -35
- package/routes/tenant.js +4 -0
- package/routes/utils.js +19 -0
- package/tests/api.test.js +2 -2
- package/tests/table.test.js +19 -2
- package/wrapper.js +14 -2
package/auth/testhelp.js
CHANGED
|
@@ -128,6 +128,20 @@ const getStaffLoginCookie = async () => {
|
|
|
128
128
|
return resToLoginCookie(res);
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @returns {Promise<void>}
|
|
134
|
+
*/
|
|
135
|
+
const getUserLoginCookie = async () => {
|
|
136
|
+
const app = await getApp({ disableCsrf: true });
|
|
137
|
+
const res = await request(app)
|
|
138
|
+
.post("/auth/login/")
|
|
139
|
+
.send("email=user@foo.com")
|
|
140
|
+
.send("password=GFeggwrwq45fjn");
|
|
141
|
+
if (res.statusCode !== 302) console.log(res.text);
|
|
142
|
+
return resToLoginCookie(res);
|
|
143
|
+
};
|
|
144
|
+
|
|
131
145
|
/**
|
|
132
146
|
*
|
|
133
147
|
* @returns {Promise<void>}
|
|
@@ -235,6 +249,7 @@ const notAuthorized = (res) => {
|
|
|
235
249
|
module.exports = {
|
|
236
250
|
getStaffLoginCookie,
|
|
237
251
|
getAdminLoginCookie,
|
|
252
|
+
getUserLoginCookie,
|
|
238
253
|
itShouldRedirectUnauthToLogin,
|
|
239
254
|
toRedirect,
|
|
240
255
|
toInclude,
|
package/locales/en.json
CHANGED
|
@@ -1107,5 +1107,24 @@
|
|
|
1107
1107
|
"Restore a snapshot": "Restore a snapshot",
|
|
1108
1108
|
"Snapshot restored": "Snapshot restored",
|
|
1109
1109
|
"Configuration check report": "Configuration check report",
|
|
1110
|
-
"Re-run": "Re-run"
|
|
1110
|
+
"Re-run": "Re-run",
|
|
1111
|
+
"Add constraint:": "Add constraint:",
|
|
1112
|
+
"Index": "Index",
|
|
1113
|
+
"Add constraint: ": "Add constraint: ",
|
|
1114
|
+
"Choose the field to be indexed": "Choose the field to be indexed",
|
|
1115
|
+
"Constraint formula": "Constraint formula",
|
|
1116
|
+
"Formula must evaluate to true for valid rows. In scope: ": "Formula must evaluate to true for valid rows. In scope: ",
|
|
1117
|
+
"Add %s constraint to %s": "Add %s constraint to %s",
|
|
1118
|
+
"What": "What",
|
|
1119
|
+
"Choose the field to be indexed. This make searching the table faster.": "Choose the field to be indexed. This make searching the table faster.",
|
|
1120
|
+
"Disk usage": "Disk usage",
|
|
1121
|
+
"CPU usage": "CPU usage",
|
|
1122
|
+
"Mem usage": "Mem usage",
|
|
1123
|
+
"The field that will be shown to the user when choosing a value": "The field that will be shown to the user when choosing a value",
|
|
1124
|
+
"String value must match regular expression": "String value must match regular expression",
|
|
1125
|
+
"Modules up-to-date. Please restart server": "Modules up-to-date. Please restart server",
|
|
1126
|
+
"Install git plugins": "Install git plugins",
|
|
1127
|
+
"Set available npm modules": "Set available npm modules",
|
|
1128
|
+
"Only store modules can be installed on tenant instances": "Only store modules can be installed on tenant instances",
|
|
1129
|
+
"Unsafe modules": "Unsafe modules"
|
|
1111
1130
|
}
|