return new User(managedUser.getUserName());
}
private void setCurrentPortalRequest(OperationContext context) {
final ManagedUser managedUser = context.getUser();
final PathAddress address = context.getAddress();
// Retrieve siteId from address (can be null)
SiteId siteId = getSiteId(address);
// Retrieve nodePath from address (can be null)
NodePath nodePath = getNodePath(address);
Locale locale = context.getLocale();
// For some HTTP requests the locale is set to *, I guess to indicate a header 'Accept-Language: *' ?
if (locale != null && locale.getLanguage().equals("*")) {
locale = null;
}
User user = (managedUser == null || managedUser.getUserName() == null) ? User.anonymous() : new User(managedUser.getUserName());
final PortalContainer container = PortalContainer.getInstance();
final WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
URIResolver uriResolver = new URIResolver() {
@Override