From ca8212159a4d1fbb1f3fa5098e83d1e7f97a6b23 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 19 Dec 2024 08:23:16 +0100 Subject: [PATCH] SEBSERV-608 --- .../gui/content/exam/AddSecurityKeyGrantPopup.java | 6 ++++-- .../sebserver/gui/content/exam/ExamSignatureKeyForm.java | 8 ++++++-- src/main/resources/messages.properties | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/AddSecurityKeyGrantPopup.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/AddSecurityKeyGrantPopup.java index a8902c32a..d0dde574a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/AddSecurityKeyGrantPopup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/AddSecurityKeyGrantPopup.java @@ -69,6 +69,8 @@ public class AddSecurityKeyGrantPopup { new LocTextKey("sebserver.exam.signaturekey.list.info"); private static final LocTextKey TABLE_COLUMN_STATUS = new LocTextKey("sebserver.exam.signaturekey.list.status"); + private static final LocTextKey GRANT_LIST_NO_ASK_SENT = + new LocTextKey("sebserver.exam.signaturekey.grantlist.noask"); private final PageService pageService; @@ -139,8 +141,8 @@ public Supplier> compose(final Composite parent) { Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_KEY_VALUE, TITLE_TEXT_FORM_SIGNATURE, (hasASK) - ? String.valueOf(this.appSignatureKeyInfo.key) - : Constants.EMPTY_NOTE) + ? this.appSignatureKeyInfo.key + : pageService.getI18nSupport().getText(GRANT_LIST_NO_ASK_SENT)) .readonly(true)) .addFieldIf(() -> hasASK && !readonly, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamSignatureKeyForm.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamSignatureKeyForm.java index 043902a82..fb15a4c4f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamSignatureKeyForm.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamSignatureKeyForm.java @@ -89,6 +89,8 @@ public class ExamSignatureKeyForm implements TemplateComposer { new LocTextKey("sebserver.exam.signaturekey.grantlist.pleaseSelect"); private static final LocTextKey GRANT_LIST_DELETE_CONFORM = new LocTextKey("sebserver.exam.signaturekey.grantlist.delete.confirm"); + private static final LocTextKey GRANT_LIST_NO_ASK_SENT = + new LocTextKey("sebserver.exam.signaturekey.grantlist.noask"); private final PageService pageService; private final ResourceService resourceService; @@ -169,10 +171,12 @@ public void compose(final PageContext pageContext) { .withPaging(-1) .hideNavigation() - .withColumn(new ColumnDefinition<>( + .withColumn(new ColumnDefinition( Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_KEY_VALUE, APP_SIG_KEY_LIST_KEY, - AppSignatureKeyInfo::getKey) + i -> StringUtils.isNotBlank(i.key) + ? i.key + : pageService.getI18nSupport().getText(GRANT_LIST_NO_ASK_SENT)) .widthProportion(2)) .withColumn(new ColumnDefinition<>( diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index b3b08b449..2b5f18e60 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1001,6 +1001,7 @@ sebserver.exam.signaturekey.grantlist.tag=Tag Name sebserver.exam.signaturekey.grantlist.tag.tooltip=The tag name if the security key grant sebserver.exam.signaturekey.grantlist.pleaseSelect=Please select a security key grant from the list. sebserver.exam.signaturekey.grantlist.delete.confirm=Are you sure to delete this security key grant +sebserver.exam.signaturekey.grantlist.noask=No ASK sent by these Clients sebserver.exam.signaturekey.grant.title=Granted sebserver.exam.signaturekey.grant.key=Granted Key Hash