[gatein-commits] gatein SVN: r421 - portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Oct 24 19:34:27 EDT 2009


Author: julien_viet
Date: 2009-10-24 19:34:26 -0400 (Sat, 24 Oct 2009)
New Revision: 421

Modified:
   portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
Log:
User profile is accessed for anonymous users and it looks like the code for accessing a user is wrong (cf GTNPORTAL-62 )


Modified: portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java	2009-10-24 15:15:00 UTC (rev 420)
+++ portal/branches/performance/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java	2009-10-24 23:34:26 UTC (rev 421)
@@ -672,11 +672,14 @@
       //
       StatefulPortletContext<C> preferencesPortletContext = getPortletContext();
 
-      // todo : wire user profile
-      // Create an ExoUserContext in component.pc package
+      // 
       OrganizationService service = getApplicationComponent(OrganizationService.class);
-      UIPortalApplication uiPortalApp = getAncestorOfType(UIPortalApplication.class);
-      UserProfile userProfile = service.getUserProfileHandler().findUserProfileByName(uiPortalApp.getOwner());
+      String user = prc.getRemoteUser();
+      UserProfile userProfile = null;
+      if (user != null)
+      {
+         userProfile = service.getUserProfileHandler().findUserProfileByName(user);
+      }
 
       // client context
       AbstractClientContext clientContext;



More information about the gatein-commits mailing list