@budibase/server 1.0.220-alpha.1 → 1.0.220
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/builder/assets/index.58a51c8a.css +6 -0
- package/builder/assets/index.e14e1be2.js +977 -0
- package/builder/assets/{vendor.001dcf8c.js → vendor.7f11b0ca.js} +74 -74
- package/builder/index.html +3 -3
- package/coverage/clover.xml +175 -201
- package/coverage/coverage-final.json +6 -6
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +13 -166
- package/coverage/lcov-report/api/controllers/index.html +28 -28
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +18 -39
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +2 -5
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +5 -5
- package/coverage/lcov-report/api/routes/utils/validators.js.html +16 -4
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +34 -34
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +18 -6
- package/coverage/lcov-report/middleware/index.html +11 -11
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +15 -15
- package/coverage/lcov-report/utilities/index.js.html +9 -24
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +271 -315
- package/dist/api/controllers/application.js +17 -17
- package/dist/api/controllers/dev.js +2 -40
- package/dist/api/controllers/layout.js +6 -11
- package/dist/api/controllers/static/index.js +1 -5
- package/dist/api/routes/dev.js +1 -2
- package/dist/api/routes/utils/validators.js +4 -0
- package/dist/middleware/currentapp.js +3 -0
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utilities/index.js +1 -5
- package/package.json +7 -7
- package/src/api/controllers/application.ts +17 -23
- package/src/api/controllers/dev.js +2 -53
- package/src/api/controllers/layout.js +10 -17
- package/src/api/controllers/static/index.js +1 -6
- package/src/api/routes/dev.js +0 -1
- package/src/api/routes/tests/application.spec.js +5 -7
- package/src/api/routes/utils/validators.js +4 -0
- package/src/middleware/currentapp.js +4 -0
- package/src/utilities/index.js +1 -6
- package/builder/assets/index.7786f497.css +0 -6
- package/builder/assets/index.b4622e74.js +0 -978
|
@@ -19,8 +19,6 @@ const staticViews_1 = require("../../db/views/staticViews");
|
|
|
19
19
|
const fileSystem_1 = require("../../utilities/fileSystem");
|
|
20
20
|
const utils_1 = require("../../db/utils");
|
|
21
21
|
const { BUILTIN_ROLE_IDS, AccessController, } = require("@budibase/backend-core/roles");
|
|
22
|
-
const layouts_1 = require("../../constants/layouts");
|
|
23
|
-
const fp_1 = require("lodash/fp");
|
|
24
22
|
const { processObject } = require("@budibase/string-templates");
|
|
25
23
|
const { CacheKeys, bustCache } = require("@budibase/backend-core/cache");
|
|
26
24
|
const { getAllApps, isDevAppID, getProdAppID, Replication, } = require("@budibase/backend-core/db");
|
|
@@ -190,7 +188,7 @@ const fetchAppPackage = (ctx) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
190
188
|
application,
|
|
191
189
|
screens,
|
|
192
190
|
layouts,
|
|
193
|
-
clientLibPath: (0, utilities_1.clientLibraryPath)(ctx.params.appId, application.version
|
|
191
|
+
clientLibPath: (0, utilities_1.clientLibraryPath)(ctx.params.appId, application.version),
|
|
194
192
|
};
|
|
195
193
|
});
|
|
196
194
|
exports.fetchAppPackage = fetchAppPackage;
|
|
@@ -236,14 +234,25 @@ const performAppCreate = (ctx) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
236
234
|
updatedAt: new Date().toISOString(),
|
|
237
235
|
createdAt: new Date().toISOString(),
|
|
238
236
|
status: utils_1.AppStatus.DEV,
|
|
237
|
+
navigation: {
|
|
238
|
+
navigation: "Top",
|
|
239
|
+
title: name,
|
|
240
|
+
navWidth: "Large",
|
|
241
|
+
navBackground: "var(--spectrum-global-color-gray-100)",
|
|
242
|
+
links: [
|
|
243
|
+
{
|
|
244
|
+
url: "/home",
|
|
245
|
+
text: "Home",
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
theme: "spectrum--light",
|
|
250
|
+
customTheme: {
|
|
251
|
+
buttonBorderRadius: "16px",
|
|
252
|
+
},
|
|
239
253
|
};
|
|
240
254
|
const response = yield db.put(newApplication, { force: true });
|
|
241
255
|
newApplication._rev = response.rev;
|
|
242
|
-
// Only create the default home screens and layout if we aren't importing
|
|
243
|
-
// an app
|
|
244
|
-
if (useTemplate !== "true") {
|
|
245
|
-
yield createEmptyAppPackage(ctx, newApplication);
|
|
246
|
-
}
|
|
247
256
|
/* istanbul ignore next */
|
|
248
257
|
if (!environment_1.default.isTest()) {
|
|
249
258
|
yield (0, fileSystem_1.createApp)(appId);
|
|
@@ -503,12 +512,3 @@ const updateAppPackage = (appPackage, appId) => __awaiter(void 0, void 0, void 0
|
|
|
503
512
|
return newAppPackage;
|
|
504
513
|
}));
|
|
505
514
|
});
|
|
506
|
-
const createEmptyAppPackage = (ctx, app) => __awaiter(void 0, void 0, void 0, function* () {
|
|
507
|
-
const db = getAppDB();
|
|
508
|
-
let screensAndLayouts = [];
|
|
509
|
-
for (let layout of layouts_1.BASE_LAYOUTS) {
|
|
510
|
-
const cloned = (0, fp_1.cloneDeep)(layout);
|
|
511
|
-
screensAndLayouts.push(yield processObject(cloned, app));
|
|
512
|
-
}
|
|
513
|
-
yield db.bulkDocs(screensAndLayouts);
|
|
514
|
-
});
|
|
@@ -13,8 +13,8 @@ const env = require("../../environment");
|
|
|
13
13
|
const { checkSlashesInUrl } = require("../../utilities");
|
|
14
14
|
const { request } = require("../../utilities/workerRequests");
|
|
15
15
|
const { clearLock } = require("../../utilities/redis");
|
|
16
|
-
const { Replication, getProdAppID
|
|
17
|
-
const { DocumentTypes
|
|
16
|
+
const { Replication, getProdAppID } = require("@budibase/backend-core/db");
|
|
17
|
+
const { DocumentTypes } = require("../../db/utils");
|
|
18
18
|
const { app: appCache } = require("@budibase/backend-core/cache");
|
|
19
19
|
const { getProdAppDB, getAppDB } = require("@budibase/backend-core/context");
|
|
20
20
|
const { events } = require("@budibase/backend-core");
|
|
@@ -129,41 +129,3 @@ exports.getBudibaseVersion = (ctx) => __awaiter(void 0, void 0, void 0, function
|
|
|
129
129
|
};
|
|
130
130
|
yield events.installation.versionChecked(version);
|
|
131
131
|
});
|
|
132
|
-
// TODO: remove as part of beta program
|
|
133
|
-
exports.checkBetaAccess = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
134
|
-
// go to the cloud platform if running self hosted
|
|
135
|
-
if (env.SELF_HOSTED || !env.MULTI_TENANCY) {
|
|
136
|
-
let baseUrl = "";
|
|
137
|
-
if (env.ACCOUNT_PORTAL_URL) {
|
|
138
|
-
baseUrl = env.ACCOUNT_PORTAL_URL.replace("account.", "");
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
baseUrl = "https://budibase.app";
|
|
142
|
-
}
|
|
143
|
-
const response = yield fetch(`${baseUrl}/api/beta/access?email=${ctx.query.email}`);
|
|
144
|
-
const json = yield response.json();
|
|
145
|
-
ctx.body = json;
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const userToCheck = ctx.query.email;
|
|
149
|
-
const BETA_USERS_DB = "app_bb_f9b77d06b9db4e3ca185476ab87a2364";
|
|
150
|
-
const BETA_USERS_TABLE = "ta_8c2c6df1c03f49cfb6340e85e066dd15";
|
|
151
|
-
try {
|
|
152
|
-
const db = dangerousGetDB(BETA_USERS_DB);
|
|
153
|
-
const betaUsers = (yield db.allDocs(getRowParams(BETA_USERS_TABLE, null, {
|
|
154
|
-
include_docs: true,
|
|
155
|
-
}))).rows.map(row => row.doc);
|
|
156
|
-
let access = false;
|
|
157
|
-
for (let betaUser of betaUsers) {
|
|
158
|
-
if (betaUser["Email address"].trim() === userToCheck) {
|
|
159
|
-
access = true;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
ctx.body = { access };
|
|
164
|
-
}
|
|
165
|
-
catch (err) {
|
|
166
|
-
console.error(err);
|
|
167
|
-
ctx.body = { access: false };
|
|
168
|
-
}
|
|
169
|
-
});
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
const { EMPTY_LAYOUT
|
|
11
|
+
const { EMPTY_LAYOUT } = require("../../constants/layouts");
|
|
12
12
|
const { generateLayoutID, getScreenParams } = require("../../db/utils");
|
|
13
13
|
const { getAppDB } = require("@budibase/backend-core/context");
|
|
14
14
|
const { events } = require("@budibase/backend-core");
|
|
@@ -32,16 +32,11 @@ exports.destroy = function (ctx) {
|
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
33
|
const db = getAppDB();
|
|
34
34
|
const layoutId = ctx.params.layoutId, layoutRev = ctx.params.layoutRev;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
include_docs: true,
|
|
41
|
-
}))).rows.map(element => element.doc.layoutId);
|
|
42
|
-
if (layoutsUsedByScreens.includes(layoutId)) {
|
|
43
|
-
ctx.throw(400, "Cannot delete a layout that's being used by a screen");
|
|
44
|
-
}
|
|
35
|
+
const layoutsUsedByScreens = (yield db.allDocs(getScreenParams(null, {
|
|
36
|
+
include_docs: true,
|
|
37
|
+
}))).rows.map(element => element.doc.layoutId);
|
|
38
|
+
if (layoutsUsedByScreens.includes(layoutId)) {
|
|
39
|
+
ctx.throw(400, "Cannot delete a layout that's being used by a screen");
|
|
45
40
|
}
|
|
46
41
|
yield db.remove(layoutId, layoutRev);
|
|
47
42
|
yield events.layout.deleted(layoutId);
|
|
@@ -69,11 +69,7 @@ exports.toggleBetaUiFeature = function (ctx) {
|
|
|
69
69
|
};
|
|
70
70
|
exports.serveBuilder = function (ctx) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
|
|
73
|
-
const designUiCookie = ctx.cookies.get("beta:design_ui");
|
|
74
|
-
// TODO: get this from the tmp Dir that we downloaded from MinIO
|
|
75
|
-
const uiPath = designUiCookie ? "new_design_ui" : "builder";
|
|
76
|
-
let builderPath = resolve(TOP_LEVEL_PATH, uiPath);
|
|
72
|
+
const builderPath = resolve(TOP_LEVEL_PATH, "builder");
|
|
77
73
|
yield send(ctx, ctx.file, { root: builderPath });
|
|
78
74
|
if (!ctx.file.includes("assets/")) {
|
|
79
75
|
yield events.serve.servedBuilder();
|
package/dist/api/routes/dev.js
CHANGED
|
@@ -18,6 +18,5 @@ if (env.isDev() || env.isTest()) {
|
|
|
18
18
|
router
|
|
19
19
|
.get("/api/dev/version", authorized(BUILDER), controller.getBudibaseVersion)
|
|
20
20
|
.delete("/api/dev/:appId/lock", authorized(BUILDER), controller.clearLock)
|
|
21
|
-
.post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert)
|
|
22
|
-
.get("/api/beta/access", controller.checkBetaAccess);
|
|
21
|
+
.post("/api/dev/:appId/revert", authorized(BUILDER), controller.revert);
|
|
23
22
|
module.exports = router;
|
|
@@ -6,6 +6,7 @@ const { BUILTIN_PERMISSION_IDS, PermissionLevels, } = require("@budibase/backend
|
|
|
6
6
|
const Joi = require("joi");
|
|
7
7
|
const OPTIONAL_STRING = Joi.string().optional().allow(null).allow("");
|
|
8
8
|
const OPTIONAL_NUMBER = Joi.number().optional().allow(null);
|
|
9
|
+
const OPTIONAL_BOOLEAN = Joi.boolean().optional().allow(null);
|
|
9
10
|
exports.tableValidator = () => {
|
|
10
11
|
// prettier-ignore
|
|
11
12
|
return joiValidator.body(Joi.object({
|
|
@@ -144,9 +145,12 @@ exports.screenValidator = () => {
|
|
|
144
145
|
// prettier-ignore
|
|
145
146
|
return joiValidator.body(Joi.object({
|
|
146
147
|
name: Joi.string().required(),
|
|
148
|
+
showNavigation: OPTIONAL_BOOLEAN,
|
|
149
|
+
width: OPTIONAL_STRING,
|
|
147
150
|
routing: Joi.object({
|
|
148
151
|
route: Joi.string().required(),
|
|
149
152
|
roleId: Joi.string().required().allow(""),
|
|
153
|
+
homeScreen: OPTIONAL_BOOLEAN,
|
|
150
154
|
}).required().unknown(true),
|
|
151
155
|
props: Joi.object({
|
|
152
156
|
_id: Joi.string().required(),
|
|
@@ -73,6 +73,9 @@ module.exports = (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
73
73
|
try {
|
|
74
74
|
yield getRole(roleHeader);
|
|
75
75
|
roleId = roleHeader;
|
|
76
|
+
// Delete admin and builder flags so that the specified role is honoured
|
|
77
|
+
delete ctx.user.builder;
|
|
78
|
+
delete ctx.user.admin;
|
|
76
79
|
}
|
|
77
80
|
catch (error) {
|
|
78
81
|
// Swallow error and do nothing
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.0.220-alpha.
|
|
4
|
+
"version": "1.0.220-alpha.3",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"license": "GPL-3.0",
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
80
|
-
"@budibase/backend-core": "^1.0.220-alpha.
|
|
81
|
-
"@budibase/client": "^1.0.220-alpha.
|
|
82
|
-
"@budibase/pro": "1.0.220-alpha.
|
|
83
|
-
"@budibase/string-templates": "^1.0.220-alpha.
|
|
80
|
+
"@budibase/backend-core": "^1.0.220-alpha.3",
|
|
81
|
+
"@budibase/client": "^1.0.220-alpha.3",
|
|
82
|
+
"@budibase/pro": "1.0.220-alpha.3",
|
|
83
|
+
"@budibase/string-templates": "^1.0.220-alpha.3",
|
|
84
84
|
"@bull-board/api": "3.7.0",
|
|
85
85
|
"@bull-board/koa": "3.9.4",
|
|
86
86
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"@babel/core": "7.17.4",
|
|
152
152
|
"@babel/preset-env": "7.16.11",
|
|
153
153
|
"@budibase/standard-components": "^0.9.139",
|
|
154
|
-
"@budibase/types": "^1.0.220-alpha.
|
|
154
|
+
"@budibase/types": "^1.0.220-alpha.3",
|
|
155
155
|
"@jest/test-sequencer": "24.9.0",
|
|
156
156
|
"@types/apidoc": "0.50.0",
|
|
157
157
|
"@types/bson": "4.2.0",
|