diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java index 93337f0a2c..0ca461f73b 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/discovery/impl/DiscoveryServiceImpl.java @@ -49,7 +49,6 @@ public class DiscoveryServiceImpl implements DiscoveryService { public static final String FEDERATED = "Federated"; private static final String DELIMITER = "@"; - private static final int DOMAIN_SEGMENT = 1; private static Log log = LogFactory.getLog( org.wso2.carbon.device.mgt.mobile.windows.api.services.discovery.impl.DiscoveryServiceImpl.class); @@ -67,7 +66,7 @@ public class DiscoveryServiceImpl implements DiscoveryService { String emailId = discoveryRequest.getEmailId(); String[] userDomains = emailId.split(DELIMITER); - String domain = userDomains[DOMAIN_SEGMENT]; + String domain = userDomains[(userDomains.length)-1]; DiscoveryResponse discoveryResponse; if (!PluginConstants.WindowsVersionProperties.REQUESTED_WIN81_VERSION.equals(discoveryRequest.getVersion()) diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/ConfigurationMgtServiceImpl.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/ConfigurationMgtServiceImpl.java index f4829183e0..214236c9f0 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/ConfigurationMgtServiceImpl.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/impl/ConfigurationMgtServiceImpl.java @@ -102,9 +102,10 @@ public class ConfigurationMgtServiceImpl implements ConfigurationMgtService { String message; ConfigurationEntry licenseEntry = null; PlatformConfiguration configuration = new PlatformConfiguration(); + configuration.setConfiguration(windowsPlatformConfiguration.getConfiguration()); try { configuration.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS); - List configs = configuration.getConfiguration(); + List configs = windowsPlatformConfiguration.getConfiguration(); for (ConfigurationEntry entry : configs) { if (PluginConstants.TenantConfigProperties.LICENSE_KEY.equals(entry.getName())) { License license = new License(); diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.platform.configuration/public/js/platform-configuration.js index 52f3dbc00c..89f8254390 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.platform.configuration/public/js/platform-configuration.js +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.platform.configuration/public/js/platform-configuration.js @@ -84,7 +84,7 @@ $(document).ready(function () { toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" }); - var windowsConfigAPI = "/api/device-mgt/windows/v1.0/services/configuration"; + var windowsConfigAPI = "/api/device-mgt/windows/v1.0/configuration"; invokerUtil.get( windowsConfigAPI, diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.type-view/private/config.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.type-view/private/config.json index f5d01d0d77..d6f50da06f 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.type-view/private/config.json +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.type-view/private/config.json @@ -10,7 +10,9 @@ "perm:windows:lock-reset", "perm:windows:reboot", "perm:windows:location", - "perm:windows:disenroll" + "perm:windows:disenroll", + "perm:windows:manage-configuration", + "perm:windows:view-configuration" ], "analyticsEnabled": "false", "groupingEnabled": "false",