fix: honour disabled password login and keep Enter off the skip action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alexander Petric
2026-11-06 22:20:01 +00:00
co-authored by Claude Opus 5.5
parent 8cbf1fc6a9
commit 63cd623bc6
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -395,6 +395,11 @@ async fn is_default_superadmin_active(
Extension(argon2): Extension<Arc<Argon2<'_>>>,
) -> JsonResult<bool> {
require_super_admin(&db, &authed).await?;
if windmill_common::global_settings::DISABLE_PASSWORD_LOGIN
.load(std::sync::atomic::Ordering::Relaxed)
{
return Ok(Json(false));
}
let hash: Option<String> = sqlx::query_scalar(
"SELECT password_hash FROM password WHERE email = 'admin@windmill.dev' \
AND login_type = 'password' AND disabled = false AND password_hash IS NOT NULL",
@@ -15,6 +15,7 @@
{open}
title="Default superadmin account still active"
confirmationText="Skip anyway"
keyListen={false}
onConfirmed={onSkip}
onCanceled={onCancel}
>