@budibase/frontend-core 1.2.5 → 1.2.8
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 +3 -3
- package/src/api/user.js +8 -10
- package/src/constants.js +13 -7
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "^1.2.
|
|
9
|
+
"@budibase/bbui": "^1.2.8",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "b3cfc815328c54aeaf0a79c35e88aa7925108520"
|
|
14
14
|
}
|
package/src/api/user.js
CHANGED
|
@@ -141,20 +141,18 @@ export const buildUserEndpoints = API => ({
|
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Invites multiple users to the current tenant.
|
|
144
|
-
* @param
|
|
145
|
-
* @param builder whether the user should be a global builder
|
|
146
|
-
* @param admin whether the user should be a global admin
|
|
144
|
+
* @param users An array of users to invite
|
|
147
145
|
*/
|
|
148
|
-
inviteUsers: async
|
|
146
|
+
inviteUsers: async users => {
|
|
149
147
|
return await API.post({
|
|
150
|
-
url: "/api/global/users/
|
|
151
|
-
body: {
|
|
152
|
-
|
|
148
|
+
url: "/api/global/users/multi/invite",
|
|
149
|
+
body: users.map(user => ({
|
|
150
|
+
email: user.email,
|
|
153
151
|
userInfo: {
|
|
154
|
-
admin: admin ? { global: true } : undefined,
|
|
155
|
-
builder: builder ? { global: true } : undefined,
|
|
152
|
+
admin: user.admin ? { global: true } : undefined,
|
|
153
|
+
builder: user.admin || user.builder ? { global: true } : undefined,
|
|
156
154
|
},
|
|
157
|
-
},
|
|
155
|
+
})),
|
|
158
156
|
})
|
|
159
157
|
},
|
|
160
158
|
|
package/src/constants.js
CHANGED
|
@@ -60,25 +60,31 @@ export const TableNames = {
|
|
|
60
60
|
USERS: "ta_users",
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
export const BudibaseRoles = {
|
|
64
|
+
AppUser: "appUser",
|
|
65
|
+
Developer: "developer",
|
|
66
|
+
Admin: "admin",
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const BudibaseRoleOptions = [
|
|
70
|
+
{ label: "App User", value: BudibaseRoles.AppUser },
|
|
71
|
+
{ label: "Developer", value: BudibaseRoles.Developer },
|
|
72
|
+
{ label: "Admin", value: BudibaseRoles.Admin },
|
|
67
73
|
]
|
|
68
74
|
|
|
69
75
|
export const BuilderRoleDescriptions = [
|
|
70
76
|
{
|
|
71
|
-
value:
|
|
77
|
+
value: BudibaseRoles.AppUser,
|
|
72
78
|
icon: "User",
|
|
73
79
|
label: "App user - Only has access to published apps",
|
|
74
80
|
},
|
|
75
81
|
{
|
|
76
|
-
value:
|
|
82
|
+
value: BudibaseRoles.Developer,
|
|
77
83
|
icon: "Hammer",
|
|
78
84
|
label: "Developer - Access to the app builder",
|
|
79
85
|
},
|
|
80
86
|
{
|
|
81
|
-
value:
|
|
87
|
+
value: BudibaseRoles.Admin,
|
|
82
88
|
icon: "Draw",
|
|
83
89
|
label: "Admin - Full access",
|
|
84
90
|
},
|