@budibase/worker 2.3.18-alpha.25 → 2.3.18-alpha.26
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.3.18-alpha.
|
|
4
|
+
"version": "2.3.18-alpha.26",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"author": "Budibase",
|
|
37
37
|
"license": "GPL-3.0",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@budibase/backend-core": "2.3.18-alpha.
|
|
40
|
-
"@budibase/pro": "2.3.18-alpha.
|
|
41
|
-
"@budibase/string-templates": "2.3.18-alpha.
|
|
42
|
-
"@budibase/types": "2.3.18-alpha.
|
|
39
|
+
"@budibase/backend-core": "2.3.18-alpha.26",
|
|
40
|
+
"@budibase/pro": "2.3.18-alpha.25",
|
|
41
|
+
"@budibase/string-templates": "2.3.18-alpha.26",
|
|
42
|
+
"@budibase/types": "2.3.18-alpha.26",
|
|
43
43
|
"@koa/router": "8.0.8",
|
|
44
44
|
"@sentry/node": "6.17.7",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"typescript": "4.7.3",
|
|
102
102
|
"update-dotenv": "1.1.1"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "545ac706be4b2c3f7bd2582a02b18394beb210be"
|
|
105
105
|
}
|
|
@@ -50,8 +50,8 @@ function buildInviteAcceptValidation() {
|
|
|
50
50
|
// prettier-ignore
|
|
51
51
|
return auth.joiValidator.body(Joi.object({
|
|
52
52
|
inviteCode: Joi.string().required(),
|
|
53
|
-
password: Joi.string().
|
|
54
|
-
firstName: Joi.string().
|
|
53
|
+
password: Joi.string().optional(),
|
|
54
|
+
firstName: Joi.string().optional(),
|
|
55
55
|
lastName: Joi.string().optional(),
|
|
56
56
|
}).required().unknown(true))
|
|
57
57
|
}
|
package/src/sdk/users/users.ts
CHANGED
|
@@ -140,7 +140,12 @@ const buildUser = async (
|
|
|
140
140
|
hashedPassword = opts.hashPassword ? await utils.hash(password) : password
|
|
141
141
|
} else if (dbUser) {
|
|
142
142
|
hashedPassword = dbUser.password
|
|
143
|
-
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// passwords are never required if sso is enforced
|
|
146
|
+
const requirePasswords =
|
|
147
|
+
opts.requirePassword && !(await pro.features.isSSOEnforced())
|
|
148
|
+
if (!hashedPassword && requirePasswords) {
|
|
144
149
|
throw "Password must be specified."
|
|
145
150
|
}
|
|
146
151
|
|
package/src/utilities/redis.ts
CHANGED
|
@@ -47,7 +47,7 @@ async function getACode(db: string, code: string, deleteCode = true) {
|
|
|
47
47
|
const client = await getClient(db)
|
|
48
48
|
const value = await client.get(code)
|
|
49
49
|
if (!value) {
|
|
50
|
-
throw "Invalid code."
|
|
50
|
+
throw new Error("Invalid code.")
|
|
51
51
|
}
|
|
52
52
|
if (deleteCode) {
|
|
53
53
|
await client.delete(code)
|