@budibase/worker 3.20.2 → 3.20.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.4",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "00bd6ef4645dfb893f5a83ec78571181ead1f084"
|
|
113
113
|
}
|
|
@@ -416,7 +416,7 @@ export const onboardUsers = async (
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
let createdPasswords: Record<string, string> = {}
|
|
419
|
-
const users
|
|
419
|
+
const users = ctx.request.body.map<User>(invite => {
|
|
420
420
|
const password = generatePassword(12)
|
|
421
421
|
createdPasswords[invite.email] = password
|
|
422
422
|
|
|
@@ -424,8 +424,8 @@ export const onboardUsers = async (
|
|
|
424
424
|
email: invite.email,
|
|
425
425
|
password,
|
|
426
426
|
forceResetPassword: true,
|
|
427
|
-
roles: invite.userInfo.apps,
|
|
428
|
-
admin: invite.userInfo.admin,
|
|
427
|
+
roles: invite.userInfo.apps || {},
|
|
428
|
+
admin: { global: !!invite.userInfo.admin },
|
|
429
429
|
builder: invite.userInfo.builder,
|
|
430
430
|
tenantId: tenancy.getTenantId(),
|
|
431
431
|
}
|
package/src/sdk/users/users.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { events, tenancy, users as usersCore } from "@budibase/backend-core"
|
|
2
2
|
import {
|
|
3
|
+
EmailTemplatePurpose,
|
|
3
4
|
InviteUserRequest,
|
|
4
5
|
InviteUsersRequest,
|
|
5
6
|
InviteUsersResponse,
|
|
6
|
-
EmailTemplatePurpose,
|
|
7
7
|
} from "@budibase/types"
|
|
8
8
|
import { sendEmail } from "../../utilities/email"
|
|
9
9
|
|
|
@@ -42,7 +42,7 @@ export async function invite(
|
|
|
42
42
|
userInfo = {}
|
|
43
43
|
}
|
|
44
44
|
userInfo.tenantId = tenantId
|
|
45
|
-
const opts
|
|
45
|
+
const opts = {
|
|
46
46
|
subject: "{{ company }} platform invitation",
|
|
47
47
|
info: userInfo,
|
|
48
48
|
}
|