@budibase/worker 2.27.4 → 2.27.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.27.
|
|
4
|
+
"version": "2.27.5",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"author": "Budibase",
|
|
38
38
|
"license": "GPL-3.0",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@budibase/backend-core": "2.27.
|
|
41
|
-
"@budibase/pro": "2.27.
|
|
42
|
-
"@budibase/string-templates": "2.27.
|
|
43
|
-
"@budibase/types": "2.27.
|
|
40
|
+
"@budibase/backend-core": "2.27.5",
|
|
41
|
+
"@budibase/pro": "2.27.5",
|
|
42
|
+
"@budibase/string-templates": "2.27.5",
|
|
43
|
+
"@budibase/types": "2.27.5",
|
|
44
44
|
"@koa/router": "8.0.8",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
46
46
|
"@types/global-agent": "2.1.1",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"global-agent": "3.0.0",
|
|
54
54
|
"ical-generator": "4.1.0",
|
|
55
55
|
"joi": "17.6.0",
|
|
56
|
+
"knex": "2.4.2",
|
|
56
57
|
"koa": "2.13.4",
|
|
57
58
|
"koa-body": "4.2.0",
|
|
58
59
|
"koa-compress": "4.0.1",
|
|
@@ -108,5 +109,5 @@
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
},
|
|
111
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "e4db515ecf2c0a19cd188cf4d646946e903717b1"
|
|
112
113
|
}
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
} from "@budibase/backend-core"
|
|
36
36
|
import { checkAnyUserExists } from "../../../utilities/users"
|
|
37
37
|
import { isEmailConfigured } from "../../../utilities/email"
|
|
38
|
+
import { BpmStatusKey, BpmStatusValue } from "@budibase/shared-core"
|
|
38
39
|
|
|
39
40
|
const MAX_USERS_UPLOAD_LIMIT = 1000
|
|
40
41
|
|
|
@@ -444,10 +445,16 @@ export const inviteAccept = async (
|
|
|
444
445
|
|
|
445
446
|
await cache.invite.deleteCode(inviteCode)
|
|
446
447
|
|
|
448
|
+
// make sure onboarding flow is cleared
|
|
449
|
+
ctx.cookies.set(BpmStatusKey.ONBOARDING, BpmStatusValue.COMPLETED, {
|
|
450
|
+
expires: new Date(0),
|
|
451
|
+
})
|
|
452
|
+
|
|
447
453
|
ctx.body = {
|
|
448
454
|
_id: user._id!,
|
|
449
455
|
_rev: user._rev!,
|
|
450
456
|
email: user.email,
|
|
457
|
+
tenantId: user.tenantId,
|
|
451
458
|
}
|
|
452
459
|
}
|
|
453
460
|
)
|
package/src/api/index.ts
CHANGED
|
@@ -4,8 +4,13 @@ const compress = require("koa-compress")
|
|
|
4
4
|
|
|
5
5
|
import zlib from "zlib"
|
|
6
6
|
import { routes } from "./routes"
|
|
7
|
-
import { middleware as pro } from "@budibase/pro"
|
|
7
|
+
import { middleware as pro, sdk } from "@budibase/pro"
|
|
8
8
|
import { auth, middleware } from "@budibase/backend-core"
|
|
9
|
+
import env from "../environment"
|
|
10
|
+
|
|
11
|
+
if (env.SQS_SEARCH_ENABLE) {
|
|
12
|
+
sdk.auditLogs.useSQLSearch()
|
|
13
|
+
}
|
|
9
14
|
|
|
10
15
|
const PUBLIC_ENDPOINTS = [
|
|
11
16
|
// deprecated single tenant sso callback
|
|
@@ -100,16 +105,20 @@ const NO_TENANCY_ENDPOINTS = [
|
|
|
100
105
|
route: "/api/admin/auth/oidc/callback",
|
|
101
106
|
method: "GET",
|
|
102
107
|
},
|
|
108
|
+
// global user search - no tenancy
|
|
109
|
+
// :id is user id
|
|
110
|
+
// TODO: this should really be `/api/system/users/:id`
|
|
111
|
+
{
|
|
112
|
+
route: "/api/global/users/tenant/:id",
|
|
113
|
+
method: "GET",
|
|
114
|
+
},
|
|
103
115
|
// tenant is determined from code in redis
|
|
104
116
|
{
|
|
105
117
|
route: "/api/global/users/invite/accept",
|
|
106
118
|
method: "POST",
|
|
107
119
|
},
|
|
108
|
-
// global user search - no tenancy
|
|
109
|
-
// :id is user id
|
|
110
|
-
// TODO: this should really be `/api/system/users/:id`
|
|
111
120
|
{
|
|
112
|
-
route: "/api/global/users/
|
|
121
|
+
route: "/api/global/users/invite/:code",
|
|
113
122
|
method: "GET",
|
|
114
123
|
},
|
|
115
124
|
]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mocks, structures } from "@budibase/backend-core/tests"
|
|
2
2
|
import { context, events } from "@budibase/backend-core"
|
|
3
3
|
import { Event, IdentityType } from "@budibase/types"
|
|
4
|
+
import { auditLogs } from "@budibase/pro"
|
|
4
5
|
import { TestConfiguration } from "../../../../tests"
|
|
5
6
|
|
|
6
7
|
mocks.licenses.useAuditLogs()
|
|
@@ -12,10 +13,13 @@ const BASE_IDENTITY = {
|
|
|
12
13
|
const USER_AUDIT_LOG_COUNT = 3
|
|
13
14
|
const APP_ID = "app_1"
|
|
14
15
|
|
|
15
|
-
describe("/api/global/auditlogs
|
|
16
|
+
describe.each(["lucene", "sql"])("/api/global/auditlogs (%s)", method => {
|
|
16
17
|
const config = new TestConfiguration()
|
|
17
18
|
|
|
18
19
|
beforeAll(async () => {
|
|
20
|
+
if (method === "sql") {
|
|
21
|
+
auditLogs.useSQLSearch()
|
|
22
|
+
}
|
|
19
23
|
await config.beforeAll()
|
|
20
24
|
})
|
|
21
25
|
|
package/src/environment.ts
CHANGED
|
@@ -45,6 +45,7 @@ const environment = {
|
|
|
45
45
|
DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL,
|
|
46
46
|
SMTP_FALLBACK_ENABLED: process.env.SMTP_FALLBACK_ENABLED,
|
|
47
47
|
DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE,
|
|
48
|
+
SQS_SEARCH_ENABLE: process.env.SQS_SEARCH_ENABLE,
|
|
48
49
|
// smtp
|
|
49
50
|
SMTP_USER: process.env.SMTP_USER,
|
|
50
51
|
SMTP_PASSWORD: process.env.SMTP_PASSWORD,
|