diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js index 438936c903..49b35cf504 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js @@ -20,6 +20,7 @@ function onRequest(context) { var log = new Log("device-view.js"); var deviceType = context.uriParams.deviceType; var deviceId = request.getParameter("id"); + var owner = request.getParameter("owner"); var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var autoCompleteParams = [ {"name" : "deviceId", "value" : deviceId} @@ -27,7 +28,7 @@ function onRequest(context) { if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; - var device = deviceModule.viewDevice(deviceType, deviceId); + var device = deviceModule.viewDevice(deviceType, deviceId, owner); if (device && device.status != "error") { var anchor = { "device" : { "id" : device.content.deviceIdentifier, "type" : device.content.type}}; var viewObject = {}; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js index 76b0976059..51eacbc501 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js @@ -20,12 +20,13 @@ function onRequest(context) { // var log = new Log("device-view.js"); var deviceType = context["uriParams"]["deviceType"]; var deviceId = request.getParameter("id"); + var owner = request.getParameter("owner"); var deviceViewData = {}; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; if (deviceType && deviceId) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; - var response = deviceModule.viewDevice(deviceType, deviceId); + var response = deviceModule.viewDevice(deviceType, deviceId, owner); if (response["status"] == "success") { deviceViewData["deviceFound"] = true; deviceViewData["isAuthorized"] = true; 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.device-view/device-view.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.device-view/device-view.js index 42c90e23c3..4986c18e20 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.device-view/device-view.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.device-view/device-view.js @@ -20,11 +20,12 @@ function onRequest(context) { // var log = new Log("device-view.js"); var deviceType = context["uriParams"]["deviceType"]; var deviceId = request.getParameter("id"); + var owner = request.getParameter("owner"); var deviceViewData = {}; if (deviceType && deviceId) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; - var response = deviceModule.viewDevice(deviceType, deviceId); + var response = deviceModule.viewDevice(deviceType, deviceId, owner); if (response["status"] == "success") { deviceViewData["deviceFound"] = true; deviceViewData["isAuthorized"] = true;