You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2023/05/22 11:59:51 UTC
[syncope] branch 3_0_X updated: [SYNCOPE-1752] Proper realm setting for self-edit via Enduser
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/3_0_X by this push:
new f062819e3e [SYNCOPE-1752] Proper realm setting for self-edit via Enduser
f062819e3e is described below
commit f062819e3ed1c08ef9e81e0b23d8cd9cf751c579
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon May 22 13:59:28 2023 +0200
[SYNCOPE-1752] Proper realm setting for self-edit via Enduser
---
.../org/apache/syncope/client/enduser/panels/any/UserDetails.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/UserDetails.java b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/UserDetails.java
index debec15dea..4e2a566db1 100644
--- a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/UserDetails.java
+++ b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/UserDetails.java
@@ -20,6 +20,7 @@ package org.apache.syncope.client.enduser.panels.any;
import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.password.strength.PasswordStrengthBehavior;
import java.util.List;
+import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.ui.commons.ajax.markup.html.LabelInfo;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
@@ -72,7 +73,8 @@ public class UserDetails extends Details<UserTO> {
AjaxDropDownChoicePanel<String> destinationRealm = new AjaxDropDownChoicePanel<>(
"destinationRealm", "destinationRealm", new PropertyModel<>(userTO, "realm"), false);
destinationRealm.setNullValid(false);
- destinationRealm.setChoices(List.of(SyncopeConstants.ROOT_REALM));
+ destinationRealm.setChoices(List.of(
+ Optional.ofNullable(userTO.getRealm()).orElse(SyncopeConstants.ROOT_REALM)));
return destinationRealm;
}