diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index 75e886cb92d..4464f06e5c7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -77,14 +77,18 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { PaginationResult result; if (type != null) { + request.setDeviceType(type); result = dms.getDevicesByType(request); } else if (user != null) { + request.setOwner(user); result = dms.getDevicesOfUser(request); } else if (ownership != null) { RequestValidationUtil.validateOwnershipType(ownership); + request.setOwnership(ownership); result = dms.getDevicesByOwnership(request); } else if (status != null) { RequestValidationUtil.validateStatus(status); + request.setStatus(status); result = dms.getDevicesByStatus(request); } else { result = dms.getAllDevices(request); 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 af2b599109d..74b1769c38a 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 @@ -79,7 +79,7 @@ public class UserManagementServiceImpl implements UserManagementService { this.inviteNewlyAddedUserToEnrollDevice(userWrapper.getUsername(), initialUserPassword); // Outputting debug message upon successful addition of user if (log.isDebugEnabled()) { - log.debug("User by username: " + userWrapper.getUsername() + " was successfully added."); + log.debug("User '" + userWrapper.getUsername() + "' has successfully been added."); } // returning response with success state return Response.status(Response.Status.OK).entity("User by username: " + userWrapper.getUsername() +