@budibase/server 2.4.42-alpha.4 → 2.4.42-alpha.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/builder/assets/{index.3e01f4fd.js → index.0d64dce3.js} +237 -237
- package/builder/index.html +1 -1
- package/dist/middleware/currentapp.js +1 -27
- package/dist/package.json +7 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/middleware/currentapp.ts +1 -30
- package/src/middleware/tests/currentapp.spec.js +6 -42
- package/src/tests/utilities/TestConfiguration.ts +3 -18
package/builder/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
10
10
|
rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
11
|
+
<script type="module" crossorigin src="/builder/assets/index.0d64dce3.js"></script>
|
|
12
12
|
<link rel="stylesheet" href="/builder/assets/index.3cb1022d.css">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
@@ -21,34 +21,14 @@ exports.default = (ctx, next) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
21
21
|
var _a;
|
|
22
22
|
// try to get the appID from the request
|
|
23
23
|
let requestAppId = yield backend_core_1.utils.getAppIdFromCtx(ctx);
|
|
24
|
-
|
|
25
|
-
let appCookie;
|
|
26
|
-
try {
|
|
27
|
-
appCookie = backend_core_1.utils.getCookie(ctx, backend_core_1.constants.Cookie.CurrentApp);
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
backend_core_1.utils.clearCookie(ctx, backend_core_1.constants.Cookie.CurrentApp);
|
|
31
|
-
}
|
|
32
|
-
if (!appCookie && !requestAppId) {
|
|
24
|
+
if (!requestAppId) {
|
|
33
25
|
return next();
|
|
34
26
|
}
|
|
35
|
-
// check the app exists referenced in cookie
|
|
36
|
-
if (appCookie) {
|
|
37
|
-
const appId = appCookie.appId;
|
|
38
|
-
const exists = yield backend_core_1.db.dbExists(appId);
|
|
39
|
-
if (!exists) {
|
|
40
|
-
backend_core_1.utils.clearCookie(ctx, backend_core_1.constants.Cookie.CurrentApp);
|
|
41
|
-
return next();
|
|
42
|
-
}
|
|
43
|
-
// if the request app ID wasn't set, update it with the cookie
|
|
44
|
-
requestAppId = requestAppId || appId;
|
|
45
|
-
}
|
|
46
27
|
// deny access to application preview
|
|
47
28
|
if (!environment_1.default.isTest()) {
|
|
48
29
|
if ((0, utils_1.isDevAppID)(requestAppId) &&
|
|
49
30
|
!(0, utils_2.isWebhookEndpoint)(ctx) &&
|
|
50
31
|
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global)) {
|
|
51
|
-
backend_core_1.utils.clearCookie(ctx, backend_core_1.constants.Cookie.CurrentApp);
|
|
52
32
|
return ctx.redirect("/");
|
|
53
33
|
}
|
|
54
34
|
}
|
|
@@ -118,12 +98,6 @@ exports.default = (ctx, next) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
118
98
|
globalId,
|
|
119
99
|
roleId, role: yield backend_core_1.roles.getRole(roleId) });
|
|
120
100
|
}
|
|
121
|
-
if ((requestAppId !== appId ||
|
|
122
|
-
appCookie == null ||
|
|
123
|
-
appCookie.appId !== requestAppId) &&
|
|
124
|
-
!skipCookie) {
|
|
125
|
-
backend_core_1.utils.setCookie(ctx, { appId }, backend_core_1.constants.Cookie.CurrentApp);
|
|
126
|
-
}
|
|
127
101
|
return next();
|
|
128
102
|
}));
|
|
129
103
|
});
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.4.42-alpha.
|
|
4
|
+
"version": "2.4.42-alpha.4",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"license": "GPL-3.0",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
47
|
-
"@budibase/backend-core": "2.4.42-alpha.
|
|
48
|
-
"@budibase/client": "2.4.42-alpha.
|
|
49
|
-
"@budibase/pro": "2.4.42-alpha.
|
|
50
|
-
"@budibase/shared-core": "2.4.42-alpha.
|
|
51
|
-
"@budibase/string-templates": "2.4.42-alpha.
|
|
52
|
-
"@budibase/types": "2.4.42-alpha.
|
|
47
|
+
"@budibase/backend-core": "2.4.42-alpha.4",
|
|
48
|
+
"@budibase/client": "2.4.42-alpha.4",
|
|
49
|
+
"@budibase/pro": "2.4.42-alpha.4",
|
|
50
|
+
"@budibase/shared-core": "2.4.42-alpha.4",
|
|
51
|
+
"@budibase/string-templates": "2.4.42-alpha.4",
|
|
52
|
+
"@budibase/types": "2.4.42-alpha.4",
|
|
53
53
|
"@bull-board/api": "3.7.0",
|
|
54
54
|
"@bull-board/koa": "3.9.4",
|
|
55
55
|
"@elastic/elasticsearch": "7.10.0",
|