#[cfg(feature = "private")] #[allow(unused)] pub use crate::users_ee::*; #[cfg(not(feature = "private"))] use crate::users::ImpersonateServiceAccountRequest; #[cfg(not(feature = "private"))] use http::StatusCode; #[cfg(not(feature = "private"))] use tower_cookies::Cookies; #[cfg(not(feature = "private"))] use windmill_api_auth::ApiAuthed; #[cfg(not(feature = "private"))] use windmill_common::DB; #[cfg(not(feature = "private"))] pub async fn impersonate_service_account( _db: DB, _authed: ApiAuthed, _cookies: Cookies, _current_token: String, _w_id: String, _req: ImpersonateServiceAccountRequest, ) -> windmill_common::error::Result<(StatusCode, String)> { Err(windmill_common::error::Error::BadRequest( "Service accounts require Windmill Enterprise Edition".to_string(), )) } #[cfg(not(feature = "private"))] pub(crate) async fn portal_cloud_trial_login( _email: &str, ) -> windmill_common::error::Result { Err(windmill_common::error::Error::FeatureUnavailable( "Starting a pre-approved trial from Windmill Cloud requires Windmill Enterprise Edition" .to_string(), )) } // The CE image builds with `private` but not `enterprise`, so these, not `users_ee`'s, serve // it: the instance-wide token list stays EE. #[cfg(not(all(feature = "private", feature = "enterprise")))] pub(crate) async fn list_tokens_as_super_admin( _db: &windmill_common::DB, _query: crate::users::TokenReviewQuery, ) -> windmill_common::error::Result> { Err(crate::users::token_review_requires_ee()) } #[cfg(not(all(feature = "private", feature = "enterprise")))] pub(crate) async fn delete_token_as_super_admin( _db: &windmill_common::DB, _authed: &windmill_api_auth::ApiAuthed, _email: &str, _token_prefix: &str, ) -> windmill_common::error::Result { Err(crate::users::token_review_requires_ee()) }