|
|
|
@ -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);
|
|
|
|
|