diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.hbs index 2026ed97a..8439db378 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.hbs @@ -19,8 +19,8 @@ {{unit "cdmf.unit.lib.qrcode"}} {{unit "mdm.unit.device.qr-modal"}} {{#zone "content"}} + <div class="row "> {{#if permissions.LIST_DEVICES}} - <div class="row "> <div class="col-md-3 wr-stats-board"> <div class="wr-stats-board-tile"> <div class="tile-name">Devices</div> @@ -150,8 +150,15 @@ </div> </div> </div> - </div> {{/if}} + {{# if permissions.PERMITTED_NONE}} + <h1 class="page-sub-title"> + Permitted None + </h1> + <br> + You are not authorized to view any of the dashboard listed resources. + {{/if}} + </div> {{/zone}} {{#zone "bottomJs"}} {{js "js/dashboard.js"}} diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.js index da2c2b46d..9a7fa6c1a 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.dashboard/dashboard.js @@ -32,6 +32,8 @@ function onRequest() { permissions["ADD_USER"] = userModule.isAuthorized("/permission/admin/device-mgt/users/manage"); permissions["LIST_ROLES"] = userModule.isAuthorized("/permission/admin/device-mgt/roles/view"); permissions["ADD_ROLE"] = userModule.isAuthorized("/permission/admin/device-mgt/roles/manage"); + permissions["PERMITTED_NONE"] = !(permissions["LIST_DEVICES"] || permissions["LIST_POLICIES"] || + permissions["LIST_USERS"] || permissions["LIST_ROLES"]); viewModel["permissions"] = permissions; //TODO: Move enrollment URL into app-conf.json