diff options
Diffstat (limited to 'id/ConfigWebTool')
7 files changed, 28 insertions, 9 deletions
diff --git a/id/ConfigWebTool/pom.xml b/id/ConfigWebTool/pom.xml index 2723c0e61..10262158e 100644 --- a/id/ConfigWebTool/pom.xml +++ b/id/ConfigWebTool/pom.xml @@ -73,7 +73,7 @@ <dependency> <groupId>MOA.id</groupId> <artifactId>moa-id-webgui</artifactId> - <version>1.0-SNAPSHOT</version> + <version>1.0</version> </dependency> <dependency> diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java index e2d473f8a..ecf0d19d7 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/FormularCustomization.java @@ -254,12 +254,16 @@ public class FormularCustomization implements IOnlineApplicationData { //store BKU-selection and send-assertion templates if (authUser.isAdmin()) { - if (isDeleteBKUTemplate()) - templates.setBKUSelectionTemplate(null); - - if (isDeleteSendAssertionTemplate()) - templates.setSendAssertionTemplate(null); + if (isDeleteBKUTemplate() && templates.getBKUSelectionTemplate() != null) { + //templates.setBKUSelectionTemplate(null); + templates.getBKUSelectionTemplate().setDelete(true); + } + if (isDeleteSendAssertionTemplate() && templates.getSendAssertionTemplate() != null) { + //templates.setSendAssertionTemplate(null); + templates.getSendAssertionTemplate().setDelete(true); + } + if (bkuSelectionForm != null && bkuSelectionForm.size() > 0) { TransformsInfoType template = new TransformsInfoType(); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java index 07c9f5eda..4be1a81de 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAPVP2Config.java @@ -40,6 +40,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentOA import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAPVP2; import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication; import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser; +import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider; import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper; import at.gv.egovernment.moa.id.configuration.validation.oa.OAPVP2ConfigValidation; import at.gv.egovernment.moa.util.Base64Utils; @@ -58,6 +59,8 @@ public class OAPVP2Config implements IOnlineApplicationData{ private String fileUploadContentType; private String fileUploadFileName; + private byte[] storedCert = null; + public OAPVP2Config() { } @@ -90,7 +93,9 @@ public class OAPVP2Config implements IOnlineApplicationData{ if (getFileUpload() != null) { pvp2.setCertificate(getCertificate()); setReLoad(true); - } + + } else if (storedCert != null) + pvp2.setCertificate(storedCert); } catch (CertificateException e) { log.info("Uploaded Certificate can not be found", e); @@ -175,6 +180,10 @@ public class OAPVP2Config implements IOnlineApplicationData{ return x509.getEncoded(); } + public void setStoredCert(byte[] storedCert) { + this.storedCert = storedCert; + } + public String getMetaDataURL() { return metaDataURL; } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java index de32d31c7..d2dac3b28 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAFileUploadValidation.java @@ -74,7 +74,7 @@ public class OAFileUploadValidation { try { File file = files.get(i); InputStream stream = new FileInputStream(file); - output.put(filename, IOUtils.toByteArray(stream)); + output.put(filename, Base64Utils.encode(stream).getBytes("UTF-8")); stream.close(); } catch (IOException e) { diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java index d850decb4..18452ed2d 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java @@ -79,7 +79,8 @@ public class OAPVP2ConfigValidation { Map<String, String> oa = ConfigurationProvider.getInstance().getDbRead().getOnlineApplicationKeyValueWithId(oaID); if (oa != null && MiscUtil.isNotEmpty(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE))) { - certSerialized = Base64Utils.decode(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE), false); + certSerialized = Base64Utils.decode(oa.get(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_PVP2X_CERTIFICATE), false); + form.setStoredCert(certSerialized); } } catch (ConfigurationException e) { diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties index 2575fa104..9116d6ef8 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties @@ -35,6 +35,8 @@ error.oa.oauth.clientSecret=Client-Secret darf nicht leer sein error.oa.oauth.keyname=Key-Name darf nicht leer sein error.oa.oauth.keystore=Keystore darf nicht leer sein und muss eine richtige URL sein. +error.oa.reversion.log.enabled=Es muss zumindest ein EventCode konfiguriert werden. +error.oa.reversion.log.eventcodes=Eventcodes d\u00FCrfen nur Zahlen enthalten. mail.userrequest.subject=Accountanforderung MOA-ID 3.x Konfigurationstool diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties index e017b6dc3..38cc6341b 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties @@ -35,6 +35,9 @@ error.oa.oauth.clientSecret=Client-Secret cannot be blank error.oa.oauth.keyname=Key-Name cannot be blank error.oa.oauth.keystore=Keystore cannot be blank and has to be provided in the form of valid URL. +error.oa.reversion.log.enabled=One EventCode is required at minimum. +error.oa.reversion.log.eventcodes=Only numbers are allowed as EventCodes + mail.userrequest.subject=Requesting accounts - MOA-ID 3.x Config Tool |