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 bc0fa5abb0..4815edd59d 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 @@ -29,13 +29,15 @@ var carbonServer = new carbonModule.server.Server({ application.put("carbonServer", carbonServer); var permissions = { - "/permission/admin/device-mgt/devices/enroll": ["ui.execute"], - "/permission/admin/device-mgt/devices/disenroll": ["ui.execute"], - "/permission/admin/device-mgt/devices/owning-device": ["ui.execute"], - "/permission/admin/device-mgt/groups": ["ui.execute"], - "/permission/admin/device-mgt/notifications": ["ui.execute"], - "/permission/admin/device-mgt/policies": ["ui.execute"], - "/permission/admin/manage/api/subscribe": ["ui.execute"] + "/permission/admin/Login": ["ui.execute"] }; +var adminPermissions = { + "/permission/admin": ["ui.execute"] +}; + +//On Startup, admin user will get both roles: devicemgt-admin and devicemgt-user +//Average user through sign-up will only receive the role: devicemgt-user. +//Admin can setup necessary permissions for the role: devicemgt-user userModule.addRole("internal/devicemgt-user", ["admin"], permissions); +userModule.addRole("internal/devicemgt-admin", ["admin"], adminPermissions); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs index 21687eef22..51d087ca34 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/nav-menu.hbs @@ -45,33 +45,33 @@ {{/if}} -