From 5d11ae1d5062c6770d4af9c573e0e1cdcb86cef2 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 30 May 2016 13:11:16 +0200 Subject: fix problem with MOA-ID-configuration GUI and SecurityLayer Templates in legacy mode --- .../moa/id/commons/config/ConfigurationMigrationUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'id/server/moa-id-commons/src/main') diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java index fb2ef456c..a221d30e4 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java @@ -239,17 +239,20 @@ public class ConfigurationMigrationUtils { if (templates != null) { List templatetype = templates.getTemplate(); if (templatetype != null) { - if (templatetype.size() > 0) { + if (templatetype.size() > 0 && + MiscUtil.isNotEmpty(templatetype.get(0).getURL())) { result.put(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_TEMPLATE_FIRST_VALUE, templatetype.get(0).getURL()); result.put(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_TEMPLATE_LEGACY, Boolean.TRUE.toString()); } else result.put(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_TEMPLATE_LEGACY, Boolean.FALSE.toString()); - if (templatetype.size() > 1) + if (templatetype.size() > 1 && + MiscUtil.isNotEmpty(templatetype.get(1).getURL())) result.put(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_TEMPLATE_SECOND_VALUE, templatetype.get(1).getURL()); - if (templatetype.size() > 2) + if (templatetype.size() > 2 && + MiscUtil.isNotEmpty(templatetype.get(2).getURL())) result.put(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_TEMPLATE_THIRD_VALUE, templatetype.get(2).getURL()); } -- cgit v1.2.3