readibility update

This commit is contained in:
Peter Clement 2023-09-05 12:28:03 +01:00
parent 70c71c13bf
commit 1997cb5d6b
1 changed files with 6 additions and 8 deletions

View File

@ -368,14 +368,12 @@
}, },
] ]
if (creationRoleType !== Constants.BudibaseRoles.Admin) { const notCreatingAdmin = creationRoleType !== Constants.BudibaseRoles.Admin
if (creationAccessType === Constants.Roles.CREATOR) { const isCreator = creationAccessType === Constants.Roles.CREATOR
payload[0].builder.apps = [prodAppId] if (notCreatingAdmin && isCreator) {
} else { payload[0].builder.apps = [prodAppId]
payload[0].apps = { } else if (notCreatingAdmin && !isCreator) {
[prodAppId]: creationAccessType, payload[0].apps = { [prodAppId]: creationAccessType }
}
}
} }
let userInviteResponse let userInviteResponse