diff --git a/backend/windmill-api/src/users_oss.rs b/backend/windmill-api/src/users_oss.rs index c2ac850874..79c90946e1 100644 --- a/backend/windmill-api/src/users_oss.rs +++ b/backend/windmill-api/src/users_oss.rs @@ -38,7 +38,7 @@ pub async fn create_user( mut _nu: NewUser, ) -> Result<(StatusCode, String)> { Err(Error::internal_err( - "Not implemented in Windmill's Open Source repository".to_string(), + "User creation is not implemented in the open-source version.".to_string(), )) } diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte index c37550e15f..d80e7fda85 100644 --- a/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte @@ -84,6 +84,8 @@ let enableHubSync = $state(true) let accountSubmitting = $state(false) let accountError = $state('') + let showOssAccountDialog = $state(false) + let ossAccountError = $state('') // --- Resource type sync (triggered on entering account step) --- let rtSyncStatus: 'idle' | 'loading' | 'success' | 'error' = $state('idle') @@ -316,7 +318,13 @@ ) ) } catch (e: any) { - accountError = e?.body?.message || e?.body || e?.message || 'An error occurred' + const msg = e?.body?.message || e?.body || e?.message || 'An error occurred' + if (typeof msg === 'string' && msg.includes('User creation is not implemented in the open-source version')) { + ossAccountError = msg + showOssAccountDialog = true + } else { + accountError = msg + } } finally { accountSubmitting = false } @@ -639,3 +647,37 @@ {/if} + +{#if showOssAccountDialog} + { + showOssAccountDialog = false + }} + on:confirmed={() => { + showOssAccountDialog = false + sendUserToast('Setup complete. Please log in with the default credentials.') + goto( + '/user/logout?rd=' + + encodeURIComponent( + '/user/login?email=' + + encodeURIComponent('admin@windmill.dev') + + '&password=' + + encodeURIComponent('changeme') + ) + ) + }} + > +
+ + {ossAccountError} + + + Click "Continue" to finish setup and log in with the default credentials + (admin@windmill.dev / changeme). + +
+
+{/if}