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 c6ed7da1bdb..8de168cceae 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");
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 90ec4bf89cd..f526cc03a33 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}}
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 d2b7521ff72..98749decd75 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() {
'Edit Permission' +
'';
- car removeLink = '' +
'' +
@@ -189,7 +189,7 @@ function loadRoles() {
'Remove' +
'';
- if (!isCloud){
+ if (!isCloud) {
innerhtml = editLink + editPermissionLink + removeLink;
}
return innerhtml;