From 7984ecde052386f81d90434a1bd3895bd1193a18 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 23 Nov 2023 16:23:05 +0000 Subject: [PATCH] Allow creators to see dev portal and use onboarding --- packages/builder/src/pages/builder/portal/_layout.svelte | 2 +- packages/builder/src/pages/builder/portal/apps/_layout.svelte | 2 +- .../src/pages/builder/portal/apps/onboarding/index.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/_layout.svelte b/packages/builder/src/pages/builder/portal/_layout.svelte index ad172e34ca..aad33f852a 100644 --- a/packages/builder/src/pages/builder/portal/_layout.svelte +++ b/packages/builder/src/pages/builder/portal/_layout.svelte @@ -16,7 +16,7 @@ let activeTab = "Apps" $: $url(), updateActiveTab($menu) - $: isOnboarding = !$apps.length && sdk.users.isGlobalBuilder($auth.user) + $: isOnboarding = !$apps.length && sdk.users.hasBuilderPermissions($auth.user) const updateActiveTab = menu => { for (let entry of menu) { diff --git a/packages/builder/src/pages/builder/portal/apps/_layout.svelte b/packages/builder/src/pages/builder/portal/apps/_layout.svelte index 4067856bfa..38c0274eca 100644 --- a/packages/builder/src/pages/builder/portal/apps/_layout.svelte +++ b/packages/builder/src/pages/builder/portal/apps/_layout.svelte @@ -34,7 +34,7 @@ } // Go to new app page if no apps exists - if (!$apps.length && sdk.users.isGlobalBuilder($auth.user)) { + if (!$apps.length && sdk.users.hasBuilderPermissions($auth.user)) { $redirect("./onboarding") } } catch (error) { diff --git a/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte b/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte index efc9236699..e8d4309dd5 100644 --- a/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/onboarding/index.svelte @@ -52,7 +52,7 @@ goToApp() } catch (e) { loading = false - notifications.error("There was a problem creating your app") + notifications.error(e.message || "There was a problem creating your app") } }