portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kimp...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions JetspeedSessionValidator.java
Date Tue, 19 Feb 2002 14:02:08 GMT
kimptoc     02/02/19 06:02:08

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        JetspeedSessionValidator.java
  Log:
  fixed bug when auto logon enabled  that caused the user object to be retrieved on every
page refresh - losing any temp settings
  
  Revision  Changes    Path
  1.14      +5 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java
  
  Index: JetspeedSessionValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JetspeedSessionValidator.java	10 Feb 2002 08:00:11 -0000	1.13
  +++ JetspeedSessionValidator.java	19 Feb 2002 14:02:08 -0000	1.14
  @@ -82,7 +82,7 @@
   @author <a href="mailto:ingo@raleigh.ibm.com">Ingo Schuster</a>
   @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  -@version $Id: JetspeedSessionValidator.java,v 1.13 2002/02/10 08:00:11 taylor Exp $
  +@version $Id: JetspeedSessionValidator.java,v 1.14 2002/02/19 14:02:08 kimptoc Exp $
   */
   public class JetspeedSessionValidator extends TemplateSessionValidator
   {
  @@ -99,7 +99,10 @@
           //we follow Turbine evolutions
            super.doPerform(data);         
        
  -        if ( JetspeedResources.getBoolean("automatic.logon.enable", false) ) {
  +        User user = data.getUser();
  +
  +        //if the user is not logged in and auto-login is enable - try and do it.
  +        if ( ( user==null || !user.hasLoggedIn() ) && JetspeedResources.getBoolean("automatic.logon.enable",
false) ) {
             // need to make sure there are cookies - turbine does not handle this currently
             if ( data.getRequest().getCookies() != null )
             {
  @@ -109,7 +112,6 @@
   
               if ( userName.length() > 0 && loginCookieValue.length() >0 )
               {
  -              User user = null;
                 try {
                   user = TurbineSecurity.getUser(userName);
                   if (user.getPerm("logincookie","").equals(loginCookieValue)) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message