From 299e3de3df978c3176be0d7601e1a64a3337b53c Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Tue, 22 Sep 2026 10:50:58 +0300 Subject: [PATCH] Remove courier card warning IB-9158 Signed-off-by: Raul Metsma --- client/MainWindow.cpp | 44 +++++++++++++++------------------- client/translations/en.ts | 20 ---------------- client/translations/et.ts | 20 ---------------- client/widgets/VerifyCert.cpp | 13 ++-------- client/widgets/WarningItem.cpp | 9 ------- client/widgets/WarningItem.h | 3 --- 6 files changed, 21 insertions(+), 88 deletions(-) diff --git a/client/MainWindow.cpp b/client/MainWindow.cpp index 683ad6b99..348b0b2a9 100644 --- a/client/MainWindow.cpp +++ b/client/MainWindow.cpp @@ -668,39 +668,33 @@ void MainWindow::updateMyEid(const QSmartCardData &data) bool pin1Blocked = data.retryCount(QSmartCardData::Pin1Type) == 0; bool pin2Blocked = data.retryCount(QSmartCardData::Pin2Type) == 0; bool pukBlocked = data.retryCount(QSmartCardData::PukType) == 0; - bool pin1Locked = data.pinLocked(QSmartCardData::Pin1Type); bool pin2Locked = data.pinLocked(QSmartCardData::Pin2Type); bool isPUKReplacable = data.isPUKReplacable(); ui->myEid->warningIcon( - pin1Blocked || pin1Locked || + pin1Blocked || pin2Blocked || pin2Locked || pukBlocked); ui->signContainerPage->cardChanged(data.signCert(), pin2Blocked || pin2Locked); - ui->cryptoContainerPage->cardChanged(data.authCert(), pin1Blocked || pin1Locked); + ui->cryptoContainerPage->cardChanged(data.authCert(), pin1Blocked); using enum WarningText::WarningType; - if(pin1Locked) - ui->warnings->showWarning({LockedCardWarning}); - else - { - if(pin1Blocked && pukBlocked) - ui->warnings->showWarning({isPUKReplacable ? Pin1PukBlockedResetWarning : Pin1PukBlockedWarning}); - else if(pin1Blocked) - ui->warnings->showWarning({UnblockPin1Warning, 0, - [this]{ changePinClicked(QSmartCardData::Pin1Type, QSmartCard::UnblockWithPuk); }}); - - if(pin2Locked && pin2Blocked) - ui->warnings->showWarning({ActivatePin2WithPUKWarning, 0, - [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::ActivateWithPuk); }}); - else if(pin2Blocked && pukBlocked) - ui->warnings->showWarning({isPUKReplacable ? Pin2PukBlockedResetWarning : Pin2PukBlockedWarning}); - else if(pin2Blocked) - ui->warnings->showWarning({UnblockPin2Warning, 0, - [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::UnblockWithPuk); }}); - else if(pin2Locked) - ui->warnings->showWarning({ActivatePin2Warning, 0, - [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::ActivateWithPin); }}); - } + if(pin1Blocked && pukBlocked) + ui->warnings->showWarning({isPUKReplacable ? Pin1PukBlockedResetWarning : Pin1PukBlockedWarning}); + else if(pin1Blocked) + ui->warnings->showWarning({UnblockPin1Warning, 0, + [this]{ changePinClicked(QSmartCardData::Pin1Type, QSmartCard::UnblockWithPuk); }}); + + if(pin2Locked && pin2Blocked) + ui->warnings->showWarning({UnblockPin2Warning, 0, + [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::ActivateWithPuk); }}); + else if(pin2Blocked && pukBlocked) + ui->warnings->showWarning({isPUKReplacable ? Pin2PukBlockedResetWarning : Pin2PukBlockedWarning}); + else if(pin2Blocked) + ui->warnings->showWarning({UnblockPin2Warning, 0, + [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::UnblockWithPuk); }}); + else if(pin2Locked) + ui->warnings->showWarning({ActivatePin2Warning, 0, + [this]{ changePinClicked(QSmartCardData::Pin2Type, QSmartCard::ActivateWithPin); }}); const qint64 DAY = 24 * 60 * 60; qint64 expiresIn = 106 * DAY; diff --git a/client/translations/en.ts b/client/translations/en.ts index 2a74ebd60..ff8fc85cc 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -3032,14 +3032,6 @@ Additional licenses and components Please check your internet connection. Please check your internet connection. - - The ID-card must be activated in order to authenticate - The ID-card must be activated in order to authenticate - - - The ID-card must be activated in order to sign - The ID-card must be activated in order to sign - PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times. @@ -3162,18 +3154,6 @@ Additional licenses and components https://www.id.ee/en/article/changing-id-card-pin-codes-and-puk-code/ https://www.id.ee/en/article/changing-id-card-pin-codes-and-puk-code/ - - Authentication and signing with the ID-card isn't possible yet. ID-card must be activated in the Police and Border Guard Board’s self-service portal in order to use it. - Authentication and signing with the ID-card isn't possible yet. ID-card must be activated in the Police and Border Guard Board’s self-service portal in order to use it. - - - Activate ID-card - Activate ID-card - - - https://www.politsei.ee/en/self-service-portal/ - https://www.politsei.ee/en/self-service-portal/ - This ASiC-S container contains XAdES signature. You are not allowed to add or remove signatures to this container. This ASiC-S container contains XAdES signature. You are not allowed to add or remove signatures to this container. diff --git a/client/translations/et.ts b/client/translations/et.ts index 24e461bfd..8b055a01d 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -2948,14 +2948,6 @@ Täiendavad litsentsid ja komponendid Change with PUK code Muuda PUK-koodiga - - The ID-card must be activated in order to authenticate - Autentimiseks tuleb ID-kaart aktiveerida - - - The ID-card must be activated in order to sign - Allkirjastamiseks tuleb ID-kaart aktiveerida - PIN%1 code must be changed in order to authenticate Autentimiseks tuleb PIN%1-koodi muuta @@ -3162,18 +3154,6 @@ Täiendavad litsentsid ja komponendid https://www.id.ee/en/article/changing-id-card-pin-codes-and-puk-code/ https://www.id.ee/artikkel/id-kaardi-pin-ja-puk-koodide-muutmine/ - - Authentication and signing with the ID-card isn't possible yet. ID-card must be activated in the Police and Border Guard Board’s self-service portal in order to use it. - ID-kaardiga isikutuvastamine ja allkirjastamine ei ole veel võimalik. ID-kaardi kasutamiseks tuleb see aktiveerida Politsei- ja Piirivalveameti iseteeninduses. - - - Activate ID-card - Aktiveeri ID-kaart - - - https://www.politsei.ee/en/self-service-portal/ - https://www.politsei.ee/et/iseteenindus/ - This ASiC-S container contains XAdES signature. You are not allowed to add or remove signatures to this container. Tegemist on XAdES allkirja sisaldava ASiC-S ümbrikuga. Sellele ümbrikule ei saa allkirja lisada ega eemaldada. diff --git a/client/widgets/VerifyCert.cpp b/client/widgets/VerifyCert.cpp index 29b95ff94..4b4755e21 100644 --- a/client/widgets/VerifyCert.cpp +++ b/client/widgets/VerifyCert.cpp @@ -129,7 +129,6 @@ void VerifyCert::update() { if(cardData.isNull() && c.isNull()) return clear(); - bool isLockedCard = !cardData.isNull() && cardData.pinLocked(QSmartCardData::Pin1Type); bool isLockedPin = !cardData.isNull() && pinType == QSmartCardData::Pin2Type && cardData.pinLocked(pinType); bool isBlockedPin = !cardData.isNull() && cardData.retryCount(pinType) == 0; bool isBlockedPuk = !cardData.isNull() && cardData.retryCount(QSmartCardData::PukType) == 0; @@ -198,21 +197,13 @@ void VerifyCert::update() ui->changePIN->setText(tr("Change PIN%1").arg(pinType)); ui->forgotPinLink->setText(tr("Change with PUK code")); - ui->changePIN->setHidden(isLockedCard || (isBlockedPin && isBlockedPuk) || isTempelType); + ui->changePIN->setHidden((isBlockedPin && isBlockedPuk) || isTempelType); if(isTempelType) { ui->info->setLabel({}); ui->info->setText(tr("PIN can be changed only using eToken utility")); } - else if(isLockedCard) - { - icon = QStringLiteral(":/images/icon_alert_large_warning.svg"); - ui->info->setLabel(QStringLiteral("warning")); - ui->info->setText(pinType == QSmartCardData::Pin1Type ? - tr("The ID-card must be activated in order to authenticate") : - tr("The ID-card must be activated in order to sign")); - } else if(isBlockedPin) { ui->changePIN->setText(tr("Unblock")); @@ -242,7 +233,7 @@ void VerifyCert::update() ui->links->setHidden(pinType == QSmartCardData::PukType && ui->changePIN->isHidden()); ui->details->setHidden(pinType == QSmartCardData::PukType); - ui->forgotPinLink->setHidden(pinType == QSmartCardData::PukType || isLockedCard || isBlockedPin || isBlockedPuk || isTempelType); + ui->forgotPinLink->setHidden(pinType == QSmartCardData::PukType || isBlockedPin || isBlockedPuk || isTempelType); ui->checkCert->setHidden(pinType == QSmartCardData::PukType || isInvalidCert); } diff --git a/client/widgets/WarningItem.cpp b/client/widgets/WarningItem.cpp index 75d94cdf2..04049660c 100644 --- a/client/widgets/WarningItem.cpp +++ b/client/widgets/WarningItem.cpp @@ -105,7 +105,6 @@ void WarningItem::lookupWarning() url = tr("https://www.politsei.ee/en/instructions/applying-for-an-id-card-for-an-adult/reminders-for-id-card-holders/"); _page = MyEid; break; - case ActivatePin1WithPUKWarning: case UnblockPin1Warning: ui->warningText->setText(QStringLiteral("%1 %2").arg( VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(1), @@ -113,7 +112,6 @@ void WarningItem::lookupWarning() ui->warningAction->setText(VerifyCert::tr("Unblock")); _page = MyEid; break; - case ActivatePin2WithPUKWarning: case UnblockPin2Warning: ui->warningText->setText(QStringLiteral("%1 %2").arg( VerifyCert::tr("PIN%1 has been blocked because PIN%1 code has been entered incorrectly 3 times.").arg(2), @@ -127,13 +125,6 @@ void WarningItem::lookupWarning() url = tr("https://www.id.ee/en/article/changing-id-card-pin-codes-and-puk-code/"); _page = MyEid; break; - case LockedCardWarning: - ui->warningText->setText(tr("Authentication and signing with the ID-card isn't possible yet. " - "ID-card must be activated in the Police and Border Guard Board’s self-service portal in order to use it.")); - ui->warningAction->setText(tr("Activate ID-card")); - url = tr("https://www.politsei.ee/en/self-service-portal/"); - _page = MyEid; - break; // SignDetails case InvalidSignatureError: setObjectName("WarningItemError"); diff --git a/client/widgets/WarningItem.h b/client/widgets/WarningItem.h index 505567742..49d942eb9 100644 --- a/client/widgets/WarningItem.h +++ b/client/widgets/WarningItem.h @@ -38,9 +38,6 @@ struct WarningText { UnblockPin1Warning, UnblockPin2Warning, ActivatePin2Warning, - ActivatePin1WithPUKWarning, - ActivatePin2WithPUKWarning, - LockedCardWarning, InvalidSignatureError, InvalidTimestampError,