-
+
|
@@ -18,4 +18,4 @@ Select | - \ No newline at end of file + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js index c4f6b2ba42..3e09ae185d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.js @@ -17,19 +17,12 @@ */ function onRequest(context) { - var log = new Log("create.js"); var DTYPE_CONF_DEVICE_TYPE_KEY = "deviceType"; var DTYPE_CONF_DEVICE_TYPE_LABEL_KEY = "label"; var utility = require("/app/modules/utility.js").utility; var userModule = require("/app/modules/user.js")["userModule"]; - var JFile = Packages.java.io.File; - var sep = JFile.separator; - - var systemProcess = require('process'); - var parent = 'file:///' + (systemProcess.getProperty('jaggery.home') || - systemProcess.getProperty('carbon.home')).replace(/[\\]/g, '/').replace(/^[\/]/g, ''); var types = {}; types["types"] = []; var typesListResponse = userModule.getPlatforms(); @@ -41,9 +34,7 @@ function onRequest(context) { if (configs && configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]) { deviceTypeLabel = configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]; } - var policyWizard = new File(parent + sep + "repository" + sep + "deployment" + sep + "server" + sep + - "jaggeryapps" + sep + "devicemgt" + sep + "app" + sep + "units" + sep + - "cdmf.unit.device.type." + deviceType + ".policy-wizard"); + var policyWizard = new File("/app/units/" + utility.getTenantedDeviceUnitName(deviceType, "policy-wizard")); if(policyWizard.isExists()){ typesListResponse["content"][type]["icon"] = utility.getDeviceThumb(deviceType); typesListResponse["content"][type]["label"] = deviceTypeLabel; @@ -52,4 +43,4 @@ function onRequest(context) { } } return types; -} \ No newline at end of file +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index b40e3564d7..2f9ca7e054 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -8,7 +8,7 @@ Admin Dashboard {{/if}} - {{#if permissions.LIST_DEVICES}} + {{#if permissions.LIST_OWN_DEVICES}}