diff --git a/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte b/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte index 2bcfd85cb6..314ab62d26 100644 --- a/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte +++ b/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte @@ -18,6 +18,7 @@ import { users, apps, groups } from "stores/portal" import { onMount } from "svelte" import { RoleUtils } from "@budibase/frontend-core" + import { roles } from "../../../../../stores/backend" export let groupId let popoverAnchor @@ -104,10 +105,17 @@ } } + const getRoleLabel = appId => { + const roleId = group?.roles?.[`app_${appId}`] + const role = $roles.find(x => x._id === roleId) + return role?.name || "Custom role" + } + onMount(async () => { try { await groups.actions.init() await apps.load() + await roles.fetch() } catch (error) { notifications.error("Error fetching User Group data") } @@ -184,11 +192,11 @@ >