[gatein-commits] gatein SVN: r6603 - portal/branches/branch-GTNPORTAL-1921/component/web/security/src/main/java/org/exoplatform/web.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jun 7 06:25:52 EDT 2011


Author: ndkhoiits
Date: 2011-06-07 06:25:51 -0400 (Tue, 07 Jun 2011)
New Revision: 6603

Modified:
   portal/branches/branch-GTNPORTAL-1921/component/web/security/src/main/java/org/exoplatform/web/CacheUserProfileFilter.java
Log:
GTNPORTAL-1914 OrganizationService always started in the annonymous request

Modified: portal/branches/branch-GTNPORTAL-1921/component/web/security/src/main/java/org/exoplatform/web/CacheUserProfileFilter.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1921/component/web/security/src/main/java/org/exoplatform/web/CacheUserProfileFilter.java	2011-06-07 07:39:47 UTC (rev 6602)
+++ portal/branches/branch-GTNPORTAL-1921/component/web/security/src/main/java/org/exoplatform/web/CacheUserProfileFilter.java	2011-06-07 10:25:51 UTC (rev 6603)
@@ -27,6 +27,7 @@
 import org.exoplatform.services.organization.OrganizationService;
 import org.exoplatform.services.organization.User;
 import org.exoplatform.services.security.ConversationState;
+import org.exoplatform.services.security.IdentityConstants;
 import org.exoplatform.services.security.web.SetCurrentIdentityFilter;
 
 import javax.servlet.FilterChain;
@@ -52,7 +53,7 @@
       ConversationState state = ConversationState.getCurrent();
       try
       {
-         if (state != null)
+         if (state != null && !state.getIdentity().getUserId().equals(IdentityConstants.ANONIM))
          {
             if (log.isDebugEnabled())
                log.debug("Conversation State found, save user profile to Conversation State.");
@@ -66,7 +67,6 @@
                User user = orgService.getUserHandler().findUserByName(state.getIdentity().getUserId());
                end(orgService);
                state.setAttribute(USER_PROFILE, user);
-
             }
 
          }



More information about the gatein-commits mailing list