diff --git a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java index 41b8c3a8d39..24b2dfa27b9 100644 --- a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java +++ b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java @@ -31,6 +31,7 @@ import org.apache.syncope.client.ui.commons.MapChoiceRenderer; import org.apache.syncope.client.ui.commons.markup.html.form.AbstractFieldPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel; +import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateFieldPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel; import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel; @@ -95,7 +96,8 @@ public void setObject(final Boolean object) { FastDateFormat formatter = StringUtils.isBlank(prop.getDatePattern()) ? FastDateFormat.getInstance() : FastDateFormat.getInstance(prop.getDatePattern()); - field = new AjaxDateTimeFieldPanel("value", label, new PropertyModel<>(prop, "value") { + + PropertyModel dateModel = new PropertyModel<>(prop, "value") { private static final long serialVersionUID = -3743432456095828573L; @@ -115,7 +117,13 @@ public Date getObject() { public void setObject(final Date object) { Optional.ofNullable(object).ifPresent(date -> prop.setValue(formatter.format(date))); } - }, formatter); + }; + + if (StringUtils.containsIgnoreCase(prop.getDatePattern(), "H")) { + field = new AjaxDateTimeFieldPanel("value", label, dateModel, formatter); + } else { + field = new AjaxDateFieldPanel("value", label, dateModel, formatter); + } break; case Enum: diff --git a/ext/saml2sp4ui/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2SP4UIUserManager.java b/ext/saml2sp4ui/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2SP4UIUserManager.java index 21bacfbe217..43724ec2fbc 100644 --- a/ext/saml2sp4ui/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2SP4UIUserManager.java +++ b/ext/saml2sp4ui/logic/src/main/java/org/apache/syncope/core/logic/saml2/SAML2SP4UIUserManager.java @@ -259,12 +259,16 @@ public String update(final String username, final SAML2SP4UIIdP idp, final SAML2 userUR = action.beforeUpdate(userUR, loginResponse); } - Pair> updated = - provisioningManager.update(userUR, false, userTO.getUsername(), SAML2SP_CONTEXT); - userTO = binder.getUserTO(updated.getLeft().getKey()); - - for (SAML2SP4UIIdPActions action : actions) { - userTO = action.afterUpdate(userTO, loginResponse); + if (userUR.isEmpty()) { + LOG.debug("No actual changes to apply for {}, ignoring", userTO.getUsername()); + } else { + Pair> updated = + provisioningManager.update(userUR, false, userTO.getUsername(), SAML2SP_CONTEXT); + userTO = binder.getUserTO(updated.getLeft().getKey()); + + for (SAML2SP4UIIdPActions action : actions) { + userTO = action.afterUpdate(userTO, loginResponse); + } } return userTO.getUsername();