mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
adding a fix for web app user retrival.
This commit is contained in:
parent
c36681baac
commit
a9ca9cf352
@ -234,12 +234,21 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
|
||||
throws MobileApplicationException {
|
||||
|
||||
List<Device> devices;
|
||||
List<org.wso2.carbon.device.mgt.common.Device> deviceList = null;
|
||||
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()).
|
||||
getDevicesOfUser(
|
||||
applicationOperationDevice.getCurrentUser().getUsername(),
|
||||
applicationOperationDevice.getPlatform());
|
||||
}
|
||||
devices = new ArrayList<>(deviceList.size());
|
||||
if(log.isDebugEnabled()){
|
||||
log.debug("device list got from mdm "+ deviceList.toString());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user