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() }