|
|
|
@ -18,8 +18,6 @@
|
|
|
|
|
|
|
|
|
|
function onRequest(context) {
|
|
|
|
|
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
|
|
|
|
|
var username = request.getParameter("username");
|
|
|
|
|
var user = userModule.getUser(username)["content"];
|
|
|
|
|
var deviceMgtProps = require("/app/modules/conf-reader/main.js")["conf"];
|
|
|
|
|
var isExsistingUser = false;
|
|
|
|
|
var userName = request.getParameter("username");
|
|
|
|
@ -48,8 +46,9 @@ function onRequest(context) {
|
|
|
|
|
canView = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TODO: Remove hardcoded admin user name.
|
|
|
|
|
var canEdit = false;
|
|
|
|
|
if (userModule.isAuthorized("/permission/admin/device-mgt/users/edit")) {
|
|
|
|
|
if (userModule.isAuthorized("/permission/admin/device-mgt/users/edit") && userName !== 'admin') {
|
|
|
|
|
canEdit = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|