From cf643e8b7db0fd55498f325b1a6af0bda141b7fa Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 26 Mar 2024 13:40:35 +0800
Subject: [PATCH] fix(polkit-agent): Fix the issue of authentication failure
 after re authentication
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- 修复授权认证失败时点击重新认证时不会进行认证的问题

Closes #32411
---
 src/polkit-agent/dialog.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/polkit-agent/dialog.cpp b/src/polkit-agent/dialog.cpp
index e7da7fe..e965c2a 100644
--- a/src/polkit-agent/dialog.cpp
+++ b/src/polkit-agent/dialog.cpp
@@ -163,7 +163,11 @@ void Dialog::startAuth(const QString& userName)
         m_authController->cancelAuthentication();
     }
 
+    ui->btn_ok->setVisible(true);
     ui->btn_ok->setEnabled(false);
+
+    ui->btn_reauth->setVisible(false);
+
     ui->edit->setEnabled(false);
     ui->edit->lineEdit()->setPlaceholderText("");
     ui->edit->lineEdit()->clear();
-- 
2.33.0

