public static void initMenu(HttpServletRequest request, JahiaUser user) {
JahiaData jData = (JahiaData) request
.getAttribute("org.jahia.data.JahiaData");
if (jData != null) {
ParamBean ctx = (ParamBean) jData.getProcessingContext();
AdministrationModulesRegistry administrationModulesRegistry = (AdministrationModulesRegistry) SpringContextSingleton
.getInstance().getContext().getBean(
"administrationModulesRegistry");
ctx.setAttribute("administrationServerModules", getMenuItems(
administrationModulesRegistry.getServerModules(), ctx, user));
ctx.setAttribute("administrationSiteModules", getMenuItems(
administrationModulesRegistry.getSiteModules(), ctx, user));
}
}