From e32c9c0bdb5e2eb85f1063f70ce59782a6690321 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 18 Aug 2016 18:27:24 +0530 Subject: [PATCH] Updating init.js module - UI --- .../jaggeryapps/devicemgt/app/modules/init.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js index d9f442cdd4e..1c367b38f5c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/init.js @@ -18,17 +18,20 @@ var carbonModule = require("carbon"); var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; +var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; +var utility = require("/app/modules/utility.js")["utility"]; + +//noinspection JSUnresolvedFunction Server var carbonServer = new carbonModule.server.Server({ tenanted: true, url: devicemgtProps["httpsURL"] + "/admin" }); + application.put("carbonServer", carbonServer); -var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; -var utility = require("/app/modules/utility.js")["utility"]; +//var permissions = { +// "/permission/admin/device-mgt/user": ["ui.execute"], +// "/permission/admin/manage/api/subscribe": ["ui.execute"] +//}; -var permissions = { - '/permission/admin/device-mgt/user': ['ui.execute'], - '/permission/admin/manage/api/subscribe': ['ui.execute'] -}; //userModule.addRole("internal/devicemgt-user", ["admin"], permissions);