From 282801c814c3f946953aa631798fd8b15af070d0 Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 15:32:28 +0530 Subject: [PATCH 1/3] updating cloud dashboard --- .../app/pages/cdmf.page.dashboard/dashboard.hbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs index 90ec4bf89c..f526cc03a3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.dashboard/dashboard.hbs @@ -78,7 +78,7 @@ {{/if}} - {{#unless isCloud}} + @@ -86,7 +86,7 @@ Add - {{/unless}} + @@ -144,7 +144,7 @@ {{/if}} - {{#unless isCloud}} + @@ -152,7 +152,7 @@ Add - {{/unless}} + @@ -197,4 +197,4 @@ {{/if}} -{{/zone}} \ No newline at end of file +{{/zone}} From 318fbf921516c5da42d42d9fd5c95d2a7b3d22b3 Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 15:54:53 +0530 Subject: [PATCH 2/3] role loading issues --- .../app/pages/cdmf.page.roles/public/js/role-listing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js index d2b7521ff7..98749decd7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js @@ -179,7 +179,7 @@ function loadRoles() { '' + ''; - car removeLink = '' + '' + @@ -189,7 +189,7 @@ function loadRoles() { '' + ''; - if (!isCloud){ + if (!isCloud) { innerhtml = editLink + editPermissionLink + removeLink; } return innerhtml; From 527b844ee3194b6651baa402de886048590b3e4a Mon Sep 17 00:00:00 2001 From: Kamidu Sachith Punchihewa Date: Sun, 19 Feb 2017 16:03:49 +0530 Subject: [PATCH 3/3] Error handled on the user session invalidation --- .../devicemgt/app/modules/business-controllers/user.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js index c6ed7da1bd..8de168ccea 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/business-controllers/user.js @@ -463,7 +463,13 @@ var userModule = function () { publicMethods.isAuthorized = function (permission) { var carbon = require("carbon"); var carbonServer = application.get("carbonServer"); - var carbonUser = session.get(constants.USER_SESSION_KEY); + var carbonUser; + try { + carbonUser = session.get(constants.USER_SESSION_KEY); + } catch (e) { + log.error("User object was not found in the session"); + carbonUser = null; + } var utility = require('/app/modules/utility.js').utility; if (!carbonUser) { log.error("User object was not found in the session");