From 22c2da7fcbecbec0428a0102a530306055cb6977 Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 13 Nov 2015 21:22:38 +0530 Subject: [PATCH 1/2] Set user level autherization is support by plugin or not --- .../device/mgt/core/DeviceManagementPluginRepository.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java index 971212b923..ed06671f0f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java @@ -21,6 +21,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; +import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementServiceComponent; import org.wso2.carbon.device.mgt.core.internal.DeviceManagerStartupListener; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; @@ -76,6 +77,12 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis try { provider.init(); DeviceManagerUtil.registerDeviceType(provider.getType()); + //TODO: + //This is a temporory fix. + //windows and IOS cannot resolve user info by extracting certs + //until fix that, use following variable to enable and disable of checking user authorization. + + DeviceManagementDataHolder.getInstance().setIsUserLevelAutherizationAllow(provider.getType(),true); } catch (Throwable e) { /* Throwable is caught intentionally as failure of one plugin - due to invalid start up parameters, etc - should not block the initialization of other device management providers */ From fdc4ad8e18e5a9d8a60f1876696e8796f3244efa Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 13 Nov 2015 21:29:47 +0530 Subject: [PATCH 2/2] Set user level autherization is support by plugin or not --- .../carbon/device/mgt/core/DeviceManagementPluginRepository.java | 1 + 1 file changed, 1 insertion(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java index ed06671f0f..7159b947e4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementPluginRepository.java @@ -49,6 +49,7 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis /* Initializing Device Management Service Provider */ provider.init(); DeviceManagerUtil.registerDeviceType(deviceType); + DeviceManagementDataHolder.getInstance().setIsUserLevelAutherizationAllow(provider.getType(),true); } } catch (DeviceManagementException e) { throw new DeviceManagementException("Error occurred while adding device management provider '" +