diff options
2 files changed, 19 insertions, 0 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java index 69ac58d15..70241fafb 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java @@ -56,6 +56,7 @@ public class Constants { public static final String SESSION_OAUTH20SECRET = "oauth20secret"; public static final String SESSION_BKUSELECTIONTEMPLATE = "bkuSelectionTemplate"; public static final String SESSION_SENDASSERTIONTEMPLATE = "sendAssertionTemplate"; + public static final String SESSION_SLTRANSFORMATION = "slTransformation"; public static final String SESSION_I18n = "WW_TRANS_I18N_LOCALE"; diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java index cb3a2a1ff..a54d6c74a 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java @@ -165,13 +165,31 @@ public class EditGeneralConfigAction extends BasicAction { log.info("General MOA-ID configuration has some errors."); for (String el : errors) addActionError(el); + + if (moaconfig.getSecLayerTransformation() != null) { + session.setAttribute(Constants.SESSION_SLTRANSFORMATION, moaconfig.getSecLayerTransformation()); + } formID = Random.nextRandom(); session.setAttribute(Constants.SESSION_FORMID, formID); + return Constants.STRUTS_ERROR_VALIDATION; + + } else { + if (moaconfig.getSecLayerTransformation() == null && + session.getAttribute(Constants.SESSION_SLTRANSFORMATION) != null && + session.getAttribute(Constants.SESSION_SLTRANSFORMATION) instanceof Map<?, ?> ) { + moaconfig.setSecLayerTransformation((Map<String, byte[]>) + session.getAttribute(Constants.SESSION_SLTRANSFORMATION)); + + } } + + String error = saveFormToDatabase(); + + session.setAttribute(Constants.SESSION_SLTRANSFORMATION, null); if (error != null) { log.warn("General MOA-ID config can not be stored in Database"); |