if (! StringTools.isTrimEmpty(request.getParameter("userId")))
{
int userId = request.getParameterAsInt("userId", - 1);
if (! UserTools.currentUserIsInGroup(request, "manager") && UserTools.getCurrentUserId(request) != userId)
{
throw new PermissionException("Permission denied to edit com device function keys of user " + userId);
}
UserDAO userDAO = (UserDAO) SpringTools.getBean(UserDAO.ID);
return userDAO.findUserById(userId).getName();
}
return UserTools.getCurrentUserName(request);