|
|
@ -19,10 +19,12 @@
|
|
|
|
function onRequest(context) {
|
|
|
|
function onRequest(context) {
|
|
|
|
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
|
|
|
|
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
|
|
|
|
var generalConfig = context.app.conf["generalConfig"];
|
|
|
|
var generalConfig = context.app.conf["generalConfig"];
|
|
|
|
|
|
|
|
var mdmProps = require('/app/conf/reader/main.js')["conf"];
|
|
|
|
|
|
|
|
|
|
|
|
context["permissions"] = userModule.getUIPermissions();
|
|
|
|
var viewModel = {};
|
|
|
|
new Log().info("## Permissions : "+ stringify(userModule.getUIPermissions()));
|
|
|
|
viewModel.permissions = userModule.getUIPermissions();
|
|
|
|
context["enrollmentURL"] = generalConfig["host"] + generalConfig["enrollmentDir"];
|
|
|
|
new Log().debug("## Permissions : " + stringify(userModule.getUIPermissions()));
|
|
|
|
|
|
|
|
//TODO: Move enrollment URL into app-conf.json
|
|
|
|
return context;
|
|
|
|
viewModel.enrollmentURL = mdmProps.enrollmentUrl;
|
|
|
|
|
|
|
|
return viewModel;
|
|
|
|
}
|
|
|
|
}
|