From d723e22a8c829891d68c72f3d002889eaa88e656 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Mon, 23 Jan 2017 13:54:19 +0530 Subject: [PATCH] Fixed roleUpdate issue --- .../mgt/jaxrs/service/impl/UserManagementServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index 42aa120a85..33495907d1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -220,9 +220,7 @@ public class UserManagementServiceImpl implements UserManagementService { log.debug("User credential of username: " + username + " has been changed"); } List currentRoles = this.getFilteredRoles(userStoreManager, username); - List newRoles = new ArrayList<>(); - newRoles.add(DEFAULT_DEVICE_USER); - newRoles.addAll(Arrays.asList(userInfo.getRoles())); + List newRoles = Arrays.asList(userInfo.getRoles()); List rolesToAdd = new ArrayList<>(newRoles); List rolesToDelete = new ArrayList<>();