adding a fix for web app user retrival.

merge-requests/1/head
inoshperera 8 years ago
parent c36681baac
commit a9ca9cf352

@ -234,12 +234,21 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
throws MobileApplicationException { throws MobileApplicationException {
List<Device> devices; List<Device> devices;
List<org.wso2.carbon.device.mgt.common.Device> deviceList = null;
try { try {
List<org.wso2.carbon.device.mgt.common.Device> deviceList = MDMServiceAPIUtils if(MDMAppConstants.WEBAPP.equals
(applicationOperationDevice.getPlatform())) {
deviceList = MDMServiceAPIUtils
.getDeviceManagementService(applicationOperationDevice.getTenantId()).
getDevicesOfUser(
applicationOperationDevice.getCurrentUser().getUsername());
} else {
deviceList = MDMServiceAPIUtils
.getDeviceManagementService(applicationOperationDevice.getTenantId()). .getDeviceManagementService(applicationOperationDevice.getTenantId()).
getDevicesOfUser( getDevicesOfUser(
applicationOperationDevice.getCurrentUser().getUsername(), applicationOperationDevice.getCurrentUser().getUsername(),
applicationOperationDevice.getPlatform()); applicationOperationDevice.getPlatform());
}
devices = new ArrayList<>(deviceList.size()); devices = new ArrayList<>(deviceList.size());
if(log.isDebugEnabled()){ if(log.isDebugEnabled()){
log.debug("device list got from mdm "+ deviceList.toString()); log.debug("device list got from mdm "+ deviceList.toString());

Loading…
Cancel
Save