update api to take a per app builder

This commit is contained in:
Peter Clement 2023-08-29 14:40:56 +01:00
parent fc3d6ad963
commit ac2389c445
2 changed files with 15 additions and 1 deletions

View File

@ -156,13 +156,14 @@ export const buildUserEndpoints = API => ({
return await API.post({ return await API.post({
url: "/api/global/users/onboard", url: "/api/global/users/onboard",
body: payload.map(invite => { body: payload.map(invite => {
const { email, admin, builder, apps } = invite const { email, admin, builder, apps, appBuilder } = invite
return { return {
email, email,
userInfo: { userInfo: {
admin: admin ? { global: true } : undefined, admin: admin ? { global: true } : undefined,
builder: builder ? { global: true } : undefined, builder: builder ? { global: true } : undefined,
apps: apps ? apps : undefined, apps: apps ? apps : undefined,
appBuilder: appBuilder ? appBuilder : undefined,
}, },
} }
}), }),

View File

@ -28,6 +28,19 @@ export const BudibaseRoleOptions = [
{ label: "Admin", value: BudibaseRoles.Admin }, { label: "Admin", value: BudibaseRoles.Admin },
] ]
export const BudibaseRoleOptionsNew = [
{
label: "Admin",
value: "admin",
subtitle: "Has full access to all apps and settings in your account",
},
{
label: "Member",
value: "appUser",
subtitle: "Can only view apps they have access to",
},
]
export const BuilderRoleDescriptions = [ export const BuilderRoleDescriptions = [
{ {
value: BudibaseRoles.AppUser, value: BudibaseRoles.AppUser,