mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-28 16:06:22 +00:00
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:
co-authored by
Claude Opus 5.5
parent
8cbf1fc6a9
commit
63cd623bc6
@@ -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}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user