diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs
index 9d24059a25..1e9135d6b1 100644
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.hbs
@@ -22,15 +22,16 @@
{{/zone}}
{{#zone "navMenu-items"}}
-
-
-
- Admin Dashboard
-
-
+
+
+
+ Resource Dashboard
+
+
{{#if permissions.LIST_DEVICES}}
+
Device Management
@@ -38,33 +39,41 @@
{{/if}}
- User Management
-
- {{#if permissions.LIST_USERS}}
- - Users
- {{/if}}
-
- {{#if permissions.LIST_ROLES}}
- - Roles
- {{/if}}
-
-
+ {{#if permissions.USER_MGT_PERMITTED}}
+ User Management
+
+ {{#if permissions.LIST_USERS}}
+ -
+ Users
+ {{/if}}
+ {{#if permissions.LIST_ROLES}}
+ -
+ Roles
+ {{/if}}
+
+
+ {{/if}}
{{#if permissions.LIST_POLICIES}}
- Policy Management
+
+ Policy Management
+ {{/if}}
+ {{#if permissions.CONFIG_MGT_PERMITTED}}
+ Configuration Management
+
+
{{/if}}
- Configuration Management
-
-
{{/zone}}
{{#zone "navbarCollapsableRightItems"}}
@@ -83,6 +92,7 @@
{{/zone}}
{{#zone "sidePanes"}}
+
{{/zone}}
{{#zone "bottomJs"}}
+
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.js
index 6111547e50..cfb664ad57 100644
--- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.js
+++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/nav-menu.js
@@ -43,16 +43,20 @@ function onRequest(context) {
// eg: {{unit "appbar" pageLink="users" title="User Management"}}
viewModel["currentActions"] = links[viewModel["pageLink"]];
viewModel["enrollmentURL"] = mdmProps["generalConfig"]["host"] + mdmProps["enrollmentDir"];
- var currentUser = session.get(constants["USER_SESSION_KEY"]);
+ viewModel["currentUser"] = session.get(constants["USER_SESSION_KEY"]);
+
var permissions = {};
- permissions.LIST_DEVICES = userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/view");
- permissions.LIST_POLICIES = userModule.isAuthorized("/permission/admin/device-mgt/policies/view");
- permissions.LIST_ROLES = userModule.isAuthorized("/permission/admin/device-mgt/roles/view");
- permissions.LIST_USERS = userModule.isAuthorized("/permission/admin/device-mgt/users/view");
- permissions.LIST_NOTIFICATIONS = userModule.isAuthorized("/permission/admin/device-mgt/notifications/view");
- permissions.LIST_CONFIGURATION = userModule.isAuthorized("/permission/admin/device-mgt/platform-configurations/view");
- viewModel.permissions = permissions;
- viewModel["currentUser"] = currentUser;
+ permissions["LIST_DEVICES"] = userModule.isAuthorized("/permission/admin/device-mgt/devices/owning-device/view");
+ permissions["LIST_POLICIES"] = userModule.isAuthorized("/permission/admin/device-mgt/policies/view");
+ permissions["LIST_USERS"] = userModule.isAuthorized("/permission/admin/device-mgt/users/view");
+ permissions["LIST_ROLES"] = userModule.isAuthorized("/permission/admin/device-mgt/roles/view");
+ permissions["USER_MGT_PERMITTED"] = (permissions["LIST_USERS"] || permissions["LIST_ROLES"]);
+ permissions["LIST_PLATFORM_CONFIGURATIONS"] = userModule.isAuthorized("/permission/admin/device-mgt/platform-configurations/view");
+ permissions["LIST_CERTIFICATES"] = userModule.isAuthorized("/permission/admin/device-mgt/certificates/view");
+ permissions["CONFIG_MGT_PERMITTED"] = (permissions["LIST_PLATFORM_CONFIGURATIONS"] || permissions["LIST_CERTIFICATES"]);
+ permissions["LIST_NOTIFICATIONS"] = userModule.isAuthorized("/permission/admin/device-mgt/notifications/view");
+
+ viewModel["permissions"] = permissions;
viewModel["appContext"] = mdmProps["appContext"];
return viewModel;
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/jquery.qrcode.min.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.ui.navbar.nav-menu/public/js/jquery.qrcode.min.js
old mode 100755
new mode 100644