Files
windmill/backend/windmill-api/src/users_oss.rs
Tristan TR fc3aae10f7 feat: add onboarding form for cloud first timers (#6876)
* Create onboarding pages

* add the users/onboarding route

* make the onboarding not available in oss

* Front end for onboarding form for cloud users

* WIP: Save current progress on first-timers onboarding feature

* Put back the cloud.ts file like before

* Add the onboading form  when cloud users connect for the first time

* Add check to show onboarding only for first time users on cloud

* Add submit_onboarding_data route in the backend

* Remove useless cookie code

* Remove useless function

* Remove the unused onMount import

* Add SQLx query cache for first_time_user field

* Allow dead_code for OnboardingData in OSS version

* Point to the latest ee hash

* Add maxlength on use_case text input

* Collect from the frontend only inputted data from the users - touche_point and use_case

* write latest ee ref

* Remove checkFirstTimeSetup() call if cloud instance

* Remove silent error

* Remove magical number from onboarding screen navigation

* remove unused databse field for login query

* Add first_time_user check in loadUser()

* Add input for the Other answer

* Update ee hash

* Remove autofocus

* Improve the submit onboarding data function checks

* Fix feature flags

* Add latest ee hash

* Update to latest hash

* Update to last ee hash

* nits

* simplify feature flag logic

* nit

* Update ee-repo-ref.txt

* nits

* update ref

---------

Co-authored-by: wendrul <dethomassin.etienne@gmail.com>
Co-authored-by: Diego Imbert <70353967+diegoimbert@users.noreply.github.com>
Co-authored-by: HugoCasa <hugo@casademont.ch>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2025-10-30 20:32:28 +01:00

83 lines
2.0 KiB
Rust

#[cfg(feature = "private")]
#[allow(unused)]
pub use crate::users_ee::*;
#[cfg(not(feature = "private"))]
use std::sync::Arc;
#[cfg(not(feature = "private"))]
use crate::db::ApiAuthed;
#[cfg(not(feature = "private"))]
use crate::users::{EditPassword, NewUser};
#[cfg(not(feature = "private"))]
use crate::{db::DB, webhook_util::WebhookShared};
#[cfg(not(feature = "private"))]
use argon2::Argon2;
#[cfg(not(feature = "private"))]
use axum::{extract::Extension, Json};
#[cfg(not(feature = "private"))]
use http::StatusCode;
#[cfg(not(feature = "private"))]
use serde::Deserialize;
#[cfg(not(feature = "private"))]
use windmill_common::error::{Error, Result};
#[cfg(not(feature = "private"))]
pub async fn create_user(
_authed: ApiAuthed,
_db: DB,
_webhook: WebhookShared,
_argon2: Arc<Argon2<'_>>,
mut _nu: NewUser,
) -> Result<(StatusCode, String)> {
Err(Error::internal_err(
"Not implemented in Windmill's Open Source repository".to_string(),
))
}
#[cfg(not(feature = "private"))]
pub async fn set_password(
_db: DB,
_argon2: Arc<Argon2<'_>>,
_authed: ApiAuthed,
_user_email: &str,
_ep: EditPassword,
) -> Result<String> {
Err(Error::internal_err(
"Not implemented in Windmill's Open Source repository".to_string(),
))
}
#[cfg(not(feature = "private"))]
pub fn send_email_if_possible(_subject: &str, _content: &str, _to: &str) {
tracing::warn!(
"send_email_if_possible is not implemented in Windmill's Open Source repository"
);
}
#[cfg(not(feature = "private"))]
#[derive(Deserialize, Debug)]
#[allow(dead_code)]
pub struct OnboardingData {
pub touch_point: String,
pub use_case: String,
}
#[cfg(not(feature = "private"))]
pub async fn submit_onboarding_data(
_authed: ApiAuthed,
Extension(_db): Extension<DB>,
Json(_data): Json<OnboardingData>,
) -> Result<String> {
Err(Error::internal_err(
"Not implemented in Windmill's Open Source repository".to_string(),
))
}