From 61e2aad44b57bad9a8cb5a27b3f58ad1341c2905 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 31 Aug 2023 10:59:50 +0100 Subject: [PATCH] remove more reference of developer --- .../src/pages/builder/portal/users/users/[userId].svelte | 2 +- packages/builder/src/stores/portal/users.js | 6 +----- packages/frontend-core/src/constants.js | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/users/users/[userId].svelte b/packages/builder/src/pages/builder/portal/users/users/[userId].svelte index e1f1c0e3a9..ce280c6ea0 100644 --- a/packages/builder/src/pages/builder/portal/users/users/[userId].svelte +++ b/packages/builder/src/pages/builder/portal/users/users/[userId].svelte @@ -138,7 +138,7 @@ return Constants.Roles.ADMIN } - if (user?.builder?.apps.includes(prodAppId)) { + if (user?.builder?.apps?.includes(prodAppId)) { return Constants.Roles.CREATOR } diff --git a/packages/builder/src/stores/portal/users.js b/packages/builder/src/stores/portal/users.js index 9cd5ed54ea..996a94013b 100644 --- a/packages/builder/src/stores/portal/users.js +++ b/packages/builder/src/stores/portal/users.js @@ -121,11 +121,7 @@ export function createUsersStore() { } const getUserRole = user => - sdk.users.isAdmin(user) - ? "admin" - : sdk.users.isBuilder(user) - ? "developer" - : "appUser" + sdk.users.isAdminOrGlobalBuilder(user) ? "admin" : "appUser" const refreshUsage = fn => diff --git a/packages/frontend-core/src/constants.js b/packages/frontend-core/src/constants.js index 7313140c57..906ad16423 100644 --- a/packages/frontend-core/src/constants.js +++ b/packages/frontend-core/src/constants.js @@ -24,7 +24,6 @@ export const BudibaseRoles = { export const BudibaseRoleOptions = [ { label: "Member", value: BudibaseRoles.AppUser }, - { label: "Developer", value: BudibaseRoles.Developer }, { label: "Admin", value: BudibaseRoles.Admin }, ]