From 1f7e8f19ed4a9eb8d0dbfa9ab6eb674bfd1da539 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 11 Mar 2024 09:55:44 +0000 Subject: [PATCH] packages/builder/src/components/start/DuplicateAppModal.svelte --- packages/builder/src/components/start/CreateAppModal.svelte | 2 +- .../builder/src/components/start/DuplicateAppModal.svelte | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/start/CreateAppModal.svelte b/packages/builder/src/components/start/CreateAppModal.svelte index 7fcc27ef03..b5fed9cdc1 100644 --- a/packages/builder/src/components/start/CreateAppModal.svelte +++ b/packages/builder/src/components/start/CreateAppModal.svelte @@ -142,7 +142,7 @@ // Create user await auth.setInitInfo({}) - if (sdk.users.isCreator($auth.user, app?.devId)) { + if (!sdk.users.isBuilder($auth.user, createdApp?.appId)) { // Refresh for access to created applications await auth.getSelf() } diff --git a/packages/builder/src/components/start/DuplicateAppModal.svelte b/packages/builder/src/components/start/DuplicateAppModal.svelte index a37e7f2b22..0db92ff76d 100644 --- a/packages/builder/src/components/start/DuplicateAppModal.svelte +++ b/packages/builder/src/components/start/DuplicateAppModal.svelte @@ -68,9 +68,9 @@ } try { - await API.duplicateApp(data, appId) + const app = await API.duplicateApp(data, appId) appsStore.load() - if (sdk.users.isCreator($auth.user, app?.devId)) { + if (!sdk.users.isBuilder($auth.user, app?.duplicateAppId)) { // Refresh for access to created applications await auth.getSelf() }