From 3e1b7b29b415e5577f27f06d8936d8ea974aad44 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 24 Feb 2014 16:33:08 +0100 Subject: allow only one SL-Template --- .../id/configuration/data/GeneralMOAIDConfig.java | 8 ++++-- .../validation/moaconfig/MOAConfigValidator.java | 33 ++++++++++++---------- 2 files changed, 24 insertions(+), 17 deletions(-) (limited to 'id') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java index e16020782..d6ede8fbf 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java @@ -185,8 +185,12 @@ public class GeneralMOAIDConfig { moaspssAuthTrustProfile = authblock.getTrustProfileID(); List list = authblock.getVerifyTransformsInfoProfileID(); - for (String el : list) - moaspssAuthTransformations += el + LINE_DELIMITER + "\n"; + if (list.size() == 1) + moaspssAuthTransformations += list.get(0); + else { + for (String el : list) + moaspssAuthTransformations += el + LINE_DELIMITER + "\n"; + } } VerifyIdentityLink idl = moaspss.getVerifyIdentityLink(); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java index fcf74a534..3723a09e9 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java @@ -160,21 +160,24 @@ public class MOAConfigValidator { log.info("Empty MoaspssAuthTransformation"); errors.add(LanguageHelper.getErrorString("validation.general.moasp.auth.transformation.empty")); } else { - check = StringHelper.formatText(check); - String[] list = check.split(GeneralMOAIDConfig.LINE_DELIMITER); - int i=1; - for(String el : list) { - if (ValidationHelper.containsPotentialCSSCharacter(el, false)) { - log.info("IdentityLinkSigners is not valid: " + el); - errors.add(LanguageHelper.getErrorString("validation.general.moasp.auth.transformation.valid", - new Object[] {i, ValidationHelper.getPotentialCSSCharacter(false)} )); - - } else { - if (MiscUtil.isNotEmpty(el.trim())) - authtranslist.add(el.trim()); - } - i++; - } + + //is only required if more then one transformation is in use +// check = StringHelper.formatText(check); +// String[] list = check.split(GeneralMOAIDConfig.LINE_DELIMITER); +// int i=1; +// for(String el : list) { +// if (ValidationHelper.containsPotentialCSSCharacter(el, false)) { +// log.info("IdentityLinkSigners is not valid: " + el); +// errors.add(LanguageHelper.getErrorString("validation.general.moasp.auth.transformation.valid", +// new Object[] {i, ValidationHelper.getPotentialCSSCharacter(false)} )); +// +// } else { +// if (MiscUtil.isNotEmpty(el.trim())) +// authtranslist.add(el.trim()); +// } +// i++; +// } + authtranslist.add(check.trim()); } form.setAuthTransformList(authtranslist); -- cgit v1.2.3