From 2b9267619102c4db2b64112aeae687b789ba40d7 Mon Sep 17 00:00:00 2001 From: megala21 Date: Wed, 5 Apr 2017 11:02:58 +0530 Subject: [PATCH] Fixes https://github.com/wso2/product-iots/issues/346 --- .../device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java | 1 + 1 file changed, 1 insertion(+) 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 ca1ad45d1d..fcb5a7db6c 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 @@ -238,6 +238,7 @@ public class UserManagementServiceImpl implements UserManagementService { } } rolesToDelete.remove(ROLE_EVERYONE); + rolesToAdd.remove(ROLE_EVERYONE); userStoreManager.updateRoleListOfUser(username, rolesToDelete.toArray(new String[rolesToDelete.size()]), rolesToAdd.toArray(new String[rolesToAdd.size()]));