From 22bcdb3f719c88e4e8d5199babadaa85e3cb772d Mon Sep 17 00:00:00 2001 From: sfiorani <109297780+sfiorani@users.noreply.github.com> Date: Thu, 23 Nov 2023 20:32:16 +0100 Subject: [PATCH] fix(rest.identity): fixed passswordAuthEnabled property (#5020) (cherry picked from commit 14e1b7c5e2e6f384a09eab47934734368c267b18) --- .../internal/rest/identity/provider/IdentityService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kura/org.eclipse.kura.rest.identity.provider/src/main/java/org/eclipse/kura/internal/rest/identity/provider/IdentityService.java b/kura/org.eclipse.kura.rest.identity.provider/src/main/java/org/eclipse/kura/internal/rest/identity/provider/IdentityService.java index 2c1bfdc9627..0c1730757c2 100644 --- a/kura/org.eclipse.kura.rest.identity.provider/src/main/java/org/eclipse/kura/internal/rest/identity/provider/IdentityService.java +++ b/kura/org.eclipse.kura.rest.identity.provider/src/main/java/org/eclipse/kura/internal/rest/identity/provider/IdentityService.java @@ -47,6 +47,7 @@ public class IdentityService { private static final String USER_ROLE_NAME_PREFIX = "kura.user."; private static final String KURA_NEED_PASSWORD_CHANGE_PROPERTY = "kura.need.password.change"; + private static final String PASSWORD_PROPERTY = "kura.password"; private final UserAdminHelper userAdminHelper; private final ConfigurationService configurationService; @@ -112,8 +113,7 @@ public Set getUserConfig() { private UserDTO initUserConfig(final User user) { - final boolean isPasswordEnabled = user.getCredentials() - .get(KURA_NEED_PASSWORD_CHANGE_PROPERTY) instanceof String; + final boolean isPasswordEnabled = user.getCredentials().get(PASSWORD_PROPERTY) instanceof String; final boolean isPasswordChangeRequired = Objects.equals("true", user.getProperties().get(KURA_NEED_PASSWORD_CHANGE_PROPERTY)); @@ -201,13 +201,13 @@ private void updatePasswordOptions(UserDTO userDTO, final Dictionary