kiran-authentication-service/0008-fix-default-device-Update-the-logic-of-the-default-a.patch
liuxinhao d706e3ef4f 更新部分问题:
- 多因子登录禁止跳转登录
- 修复更新默认认证设备的逻辑,更新翻译
- 多因子认证,处理只有密码认证的情况
- 设备适配器不更新不存在的默认设备
2023-06-02 15:21:40 +08:00

62 lines
2.4 KiB
Diff

From 17523794f035c7e66c232a799830c994da1a8a1b Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Fri, 2 Jun 2023 15:05:34 +0800
Subject: [PATCH 8/9] fix(default device): Update the logic of the default
authentication device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复更新默认认证设备的逻辑,更新翻译
---
src/daemon/device/device-adaptor.cpp | 7 +++++--
translations/kiran-authentication-daemon.zh_CN.ts | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/daemon/device/device-adaptor.cpp b/src/daemon/device/device-adaptor.cpp
index 32c768f..369554d 100644
--- a/src/daemon/device/device-adaptor.cpp
+++ b/src/daemon/device/device-adaptor.cpp
@@ -92,13 +92,14 @@ void DeviceAdaptor::updateDBusDeviceProxy(QSharedPointer<AuthDeviceProxy> dbusDe
{
RETURN_IF_FALSE(dbusDeviceProxy);
+ DEVICE_DEBUG() << "update auth device";
if (!this->m_dbusDeviceProxy ||
this->m_dbusDeviceProxy->deviceID() != dbusDeviceProxy->deviceID())
{
if (this->m_dbusDeviceProxy)
{
- this->m_dbusDeviceProxy->disconnect();
- this->m_dbusDeviceProxy = nullptr;
+ this->m_dbusDeviceProxy->disconnect(this);
+ this->m_dbusDeviceProxy.clear();
}
this->m_dbusDeviceProxy = dbusDeviceProxy;
@@ -108,6 +109,8 @@ void DeviceAdaptor::updateDBusDeviceProxy(QSharedPointer<AuthDeviceProxy> dbusDe
connect(this->m_dbusDeviceProxy.get(), &AuthDeviceProxy::EnrollStatus, this, &DeviceAdaptor::onEnrollStatus);
connect(this->m_dbusDeviceProxy.get(), &AuthDeviceProxy::IdentifyStatus, this, &DeviceAdaptor::onIdentifyStatus);
+
+ DEVICE_DEBUG() << "update auth device finished";
this->schedule();
}
}
diff --git a/translations/kiran-authentication-daemon.zh_CN.ts b/translations/kiran-authentication-daemon.zh_CN.ts
index 8c03e2c..e74195f 100644
--- a/translations/kiran-authentication-daemon.zh_CN.ts
+++ b/translations/kiran-authentication-daemon.zh_CN.ts
@@ -27,7 +27,7 @@
<translation>请输入PIN码。</translation>
</message>
<message>
- <location filename="../src/daemon/session.cpp" line="308"/>
+ <location filename="../src/daemon/session.cpp" line="313"/>
<source>can not find %1 device</source>
<translation>未能检测到%1设备</translation>
</message>
--
2.33.0