context.put("solution",requestParams.getParameter("solution"));
context.put("path", requestParams.getParameter("path"));
context.put("file", requestParams.getParameter("file"));
// The first method works in 3.6, for 3.5 it's a different method. We'll try both
IUserDetailsRoleListService service = PentahoSystem.get(IUserDetailsRoleListService.class);
if (service == null) {
// TODO - Remove this block of code once we drop support for older versions than SUGAR
service = PentahoSystem.getUserDetailsRoleListService();
}
String userName = userSession.getName();
if (!userName.equals("anonymousUser")) {
context.put("roles", service.getRolesForUser(userName));
}
JSONObject params = new JSONObject();
Iterator it = requestParams.getParameterNames();