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/xdocs changes.xml
Date Wed, 09 Jan 2002 12:14:20 GMT
kimptoc     02/01/09 04:14:20

  Modified:    src/java/org/apache/jetspeed/modules/actions JLoginUser.java
                        JetspeedSessionValidator.java UpdateAccount.java
               src/java/org/apache/jetspeed/modules/localization
                        JetspeedLocalization_en.properties
               webapp/WEB-INF/conf JetspeedResources.properties
                        TurbineResources.properties
               webapp/WEB-INF/templates/vm/navigations/html top.vm
               webapp/WEB-INF/templates/vm/screens/html EditAccount.vm
                        Login.vm
               xdocs    changes.xml
  Added:       src/java/org/apache/jetspeed/modules/actions
                        JLogoutUser.java
  Log:
  bug 4191 -automatic logon added
  
  Revision  Changes    Path
  1.21      +65 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLoginUser.java
  
  Index: JLoginUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLoginUser.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JLoginUser.java	28 Dec 2001 12:14:07 -0000	1.20
  +++ JLoginUser.java	9 Jan 2002 12:14:20 -0000	1.21
  @@ -62,6 +62,8 @@
   import java.util.Locale;
   import java.io.StringWriter;
   
  +import javax.servlet.http.Cookie;
  +
   // Turbine Modules
   import org.apache.velocity.context.Context;
   import org.apache.turbine.TurbineConstants;
  @@ -192,7 +194,7 @@
               return;
           }
   
  -        // we are on the ConfirmRegistration page
  +        // are we on the ConfirmRegistration page?
           Log.info("Entering JLoginUser action");
   
           boolean newUserApproval = JetspeedResources.getBoolean("newuser.approval.enable",
false);
  @@ -267,6 +269,7 @@
                     data.setMessage(Localization.getString("JLOGINUSER_KEYNOTVALID"));
                     data.setScreenTemplate("NewUserRejected");
                     data.getUser().setHasLoggedIn(new Boolean (false) );
  +
                     return;
                   }
                   else
  @@ -277,6 +280,67 @@
                     return;
                   }
               }
  +
  +            // user has logged in successfully at this point
  +  
  +            boolean automaticLogonEnabled = JetspeedResources.getBoolean("automatic.logon.enable",
false);
  +            if (automaticLogonEnabled)
  +            {
  +              //Does the user want to use this facility?
  +              boolean userRequestsRememberMe = data.getParameters().getBoolean("rememberme",false);
  +              if (userRequestsRememberMe)
  +              {
  +                //save cookies on the users machine.
  +                int maxage = JetspeedResources.getInt("automatic.logon.cookie.maxage",-1);
  +                String comment = JetspeedResources.getString("automatic.logon.cookie.comment","");
  +                String domain = JetspeedResources.getString("automatic.logon.cookie.domain");
  +                String path = JetspeedResources.getString("automatic.logon.cookie.path","/");
  +
  +                if (domain == null)
  +                {
  +                  String server = data.getServerName();
  +                  domain = "." + server;
  +                }
  +
  +                String loginCookieValue = null;
  +
  +                if ( JetspeedResources.getString("automatic.logon.cookie.generation","everylogon").equals("everylogon")
)
  +                {
  +                  loginCookieValue = ""+Math.random();
  +                  data.getUser().setPerm("logincookie",loginCookieValue);
  +                  JetspeedSecurity.saveUser( data.getUser() );
  +                } 
  +                else 
  +                {
  +                  loginCookieValue = (String)data.getUser().getPerm("logincookie");
  +                  if (loginCookieValue == null || loginCookieValue.length() == 0)
  +                  {
  +                    loginCookieValue = ""+Math.random();
  +                    data.getUser().setPerm("logincookie",loginCookieValue);
  +                    JetspeedSecurity.saveUser( data.getUser() );
  +                  }
  +                }
  +
  +                Cookie userName = new Cookie("username",data.getUser().getUserName());
  +                Cookie loginCookie = new Cookie("logincookie",loginCookieValue);
  +
  +                userName.setMaxAge(maxage);
  +                userName.setComment(comment);
  +                userName.setDomain(domain);
  +                userName.setPath(path);
  +
  +                loginCookie.setMaxAge(maxage);
  +                loginCookie.setComment(comment);
  +                loginCookie.setDomain(domain);
  +                loginCookie.setPath(path);
  +
  +                data.getResponse().addCookie(userName);
  +                data.getResponse().addCookie(loginCookie);
  +
  +              }
  +                    
  +            }
  +
           }
       }
   }
  
  
  
  1.12      +32 -2     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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JetspeedSessionValidator.java	3 Jan 2002 08:46:11 -0000	1.11
  +++ JetspeedSessionValidator.java	9 Jan 2002 12:14:20 -0000	1.12
  @@ -59,12 +59,15 @@
   
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.Log;
  +import org.apache.turbine.util.security.UnknownEntityException;
   import org.apache.turbine.services.security.TurbineSecurity;
  +import org.apache.turbine.om.security.User;
   import org.apache.turbine.modules.actions.sessionvalidator.TemplateSessionValidator;
   import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.services.Profiler;
   import org.apache.jetspeed.om.profile.Profile;
  +import org.apache.jetspeed.services.resources.JetspeedResources;
   
   /**
   Just like org.apache.turbine.modules.actions.sessionvalidator.TemplateSessionValidator
except:
  @@ -79,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.11 2002/01/03 08:46:11 kimptoc Exp $
  +@version $Id: JetspeedSessionValidator.java,v 1.12 2002/01/09 12:14:20 kimptoc Exp $
   */
   public class JetspeedSessionValidator extends TemplateSessionValidator
   {
  @@ -95,7 +98,34 @@
           //first, invoke our superclass action to make sure 
           //we follow Turbine evolutions
            super.doPerform(data);         
  -         
  +     
  +        if ( JetspeedResources.getBoolean("automatic.logon.enable", false) ) {
  +          // need to make sure there are cookies - turbine does not handle this currently
  +          if ( data.getRequest().getCookies() != null )
  +          {
  +            //check for user in cookie 
  +            String userName = data.getCookies().getString("username","");
  +            String loginCookieValue = data.getCookies().getString("logincookie","");
  +
  +            if ( userName.length() > 0 && loginCookieValue.length() >0 )
  +            {
  +              User user = null;
  +              try {
  +                user = TurbineSecurity.getUser(userName);
  +                if (user.getPerm("logincookie","").equals(loginCookieValue)) {
  +                  //cookie is present and correct - log the user in
  +                  data.setUser(user);
  +                  user.setHasLoggedIn(new Boolean(true));
  +                  user.updateLastLogin();
  +                  data.save();
  +                }
  +              } catch (UnknownEntityException noSuchUser) {
  +                //user not found - ignore it - they will not be logged in automatically
  +              }
  +            }
  +          }
  +        }
  +
           // now, define Jetspeed specific properties, using the customized
           // RunData properties
           JetspeedRunData jdata = null;
  
  
  
  1.13      +85 -0     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/UpdateAccount.java
  
  Index: UpdateAccount.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/UpdateAccount.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- UpdateAccount.java	26 Nov 2001 19:25:25 -0000	1.12
  +++ UpdateAccount.java	9 Jan 2002 12:14:20 -0000	1.13
  @@ -59,12 +59,15 @@
   import java.sql.Connection;
   import java.util.Hashtable;
   
  +import javax.servlet.http.Cookie;
  +
   // External Stuff
   import org.apache.turbine.modules.Action;
   import org.apache.turbine.modules.ActionLoader;
   import org.apache.turbine.services.localization.Localization;
   import org.apache.turbine.services.security.TurbineSecurity;
   import org.apache.turbine.util.RunData;
  +import org.apache.turbine.util.Log;
   import org.apache.turbine.util.GenerateUniqueId;
   import org.apache.turbine.om.security.User;
   import org.apache.jetspeed.services.resources.JetspeedResources;
  @@ -93,6 +96,7 @@
           String firstname = data.getParameters().getString( "firstname", "" );
           String lastname  = data.getParameters().getString( "lastname" , "" );
           String email     = data.getParameters().getString( "email" , "" );
  +        boolean userRequestsRememberMe = data.getParameters().getBoolean( "rememberme"
, false );
   
           // Save user input in case there is an error and 
           // we have to go back to the EditAccount screen
  @@ -147,6 +151,87 @@
               data.setMessage(Localization.getString("UPDATEACCOUNT_NOLASTNAME"));
               backToEditAccount( data, screenData );
               return;
  +        }
  +
  +        // if automatic login is enabled, then handle the remember me checkbox
  +        if ( JetspeedResources.getBoolean("automatic.logon.enable", false) )
  +        {
  +          if ( ! userRequestsRememberMe ) 
  +          {
  +            if ( data.getRequest().getCookies() != null &&
  +                 data.getCookies().getString("username") != null &&
  +                 data.getCookies().getString("logincookie") != null )
  +            {
  +              // remove cookies by re-adding them with zero MaxAge, which deletes them
  +              Cookie userName = new Cookie("username","");
  +              Cookie loginCookie = new Cookie("logincookie","");
  +
  +              String comment = JetspeedResources.getString("automatic.logon.cookie.comment","");
  +              String domain = JetspeedResources.getString("automatic.logon.cookie.domain");
  +              String path = JetspeedResources.getString("automatic.logon.cookie.path","/");
  +
  +              if (domain == null)
  +              {
  +                String server = data.getServerName();
  +                domain = "." + server;
  +              }
  +
  +              userName.setMaxAge(0);
  +              userName.setComment(comment);
  +              userName.setDomain(domain);
  +              userName.setPath(path);
  +
  +              loginCookie.setMaxAge(0);
  +              loginCookie.setComment(comment);
  +              loginCookie.setDomain(domain);
  +              loginCookie.setPath(path);
  +
  +              data.getResponse().addCookie(userName);
  +              data.getResponse().addCookie(loginCookie);
  +            }
  +          } 
  +          else 
  +          {
  +            if ( data.getRequest().getCookies() == null ||
  +                 !data.getCookies().getString("username","").equals(data.getUser().getUserName())
||
  +                 !data.getCookies().getString("logincookie").equals(data.getUser().getPerm("logincookie"))
)
  +            {
  +              String loginCookieValue = (String)data.getUser().getPerm("logincookie");
  +              if (loginCookieValue == null || loginCookieValue.length() == 0)
  +              {
  +                loginCookieValue = ""+Math.random();
  +                data.getUser().setPerm("logincookie",loginCookieValue);
  +                TurbineSecurity.saveUser( data.getUser() );
  +              }
  +
  +              Cookie userName = new Cookie("username",data.getUser().getUserName());
  +              Cookie loginCookie = new Cookie("logincookie",loginCookieValue);
  +
  +              int maxage = JetspeedResources.getInt("automatic.logon.cookie.maxage",-1);
  +              String comment = JetspeedResources.getString("automatic.logon.cookie.comment","");
  +              String domain = JetspeedResources.getString("automatic.logon.cookie.domain");
  +              String path = JetspeedResources.getString("automatic.logon.cookie.path","/");
  +
  +              if (domain == null)
  +              {
  +                String server = data.getServerName();
  +                domain = "." + server;
  +              }
  +
  +              userName.setMaxAge(maxage);
  +              userName.setComment(comment);
  +              userName.setDomain(domain);
  +              userName.setPath(path);
  +
  +              loginCookie.setMaxAge(maxage);
  +              loginCookie.setComment(comment);
  +              loginCookie.setDomain(domain);
  +              loginCookie.setPath(path);
  +
  +              data.getResponse().addCookie(userName);
  +              data.getResponse().addCookie(loginCookie);
  +            }
  +          }
           }
   
           // EMAIL
  
  
  
  1.1                  jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLogoutUser.java
  
  Index: JLogoutUser.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.jetspeed.modules.actions;
  
   
  // Java Core Classes
  
  import javax.servlet.http.Cookie;
  
  // Turbine Modules
  import org.apache.turbine.modules.ActionEvent;
  import org.apache.turbine.modules.ActionLoader;
  import org.apache.turbine.util.Log;
  import org.apache.turbine.util.RunData;
  
  import org.apache.jetspeed.services.resources.JetspeedResources;
  
  /**
      This class is responsible for logging a user out of the system.
  */
  public class JLogoutUser extends ActionEvent
  {
  
      public void doPerform( RunData data ) throws Exception
      {
          Log.info("Entering action JLogoutUser");
  
          // if automatic login is enabled, then remove cookies when user logs out
          if ( JetspeedResources.getBoolean("automatic.logon.enable", false) )
          {
            // remove cookies by re-adding them with zero MaxAge, which deletes them
            Cookie userName = new Cookie("username","");
            Cookie loginCookie = new Cookie("logincookie","");
  
            String comment = JetspeedResources.getString("automatic.logon.cookie.comment","");
            String domain = JetspeedResources.getString("automatic.logon.cookie.domain");
            String path = JetspeedResources.getString("automatic.logon.cookie.path","/");
  
            if (domain == null)
            {
              String server = data.getServerName();
              domain = "." + server;
            }
  
            userName.setMaxAge(0);
            userName.setComment(comment);
            userName.setDomain(domain);
            userName.setPath(path);
  
            loginCookie.setMaxAge(0);
            loginCookie.setComment(comment);
            loginCookie.setDomain(domain);
            loginCookie.setPath(path);
  
            data.getResponse().addCookie(userName);
            data.getResponse().addCookie(loginCookie);
  
  
            // also need to remove the cookies from the current request - otherwise the session
validator will log user in again
            if ( data.getRequest().getCookies() != null)
            {
              data.getCookies().remove("logincookie");
              data.getCookies().remove("username");
            }
          }        
  
          // use the standard turbine logout facility
          ActionLoader.getInstance().exec(data, "LogoutUser");
          
      }
  }
  
  
  
  1.11      +7 -0      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/localization/JetspeedLocalization_en.properties
  
  Index: JetspeedLocalization_en.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/localization/JetspeedLocalization_en.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JetspeedLocalization_en.properties	9 Jan 2002 11:36:32 -0000	1.10
  +++ JetspeedLocalization_en.properties	9 Jan 2002 12:14:20 -0000	1.11
  @@ -5,6 +5,12 @@
   
   LOCALIZATION_MAINTAINER=Jetspeed Development Team
   
  +LOGIN_USERNAME=Username:
  +LOGIN_PASSWORD=Password:
  +LOGIN_REMEMBERME=Remember me on this computer
  +LOGIN_LOGIN=Login
  +LOGIN_NEW_ACCOUNT=Create a new account
  +
   JLOGINUSER_PASSWORDREMINDER_INVALIDUSER=Sorry, that username is not valid.
   JLOGINUSER_PASSWORDREMINDER_SENT=Your password has been emailed to you.
   JLOGINUSER_PASSWORDREMINDER_ERROR=Error sending password reminder:
  @@ -72,6 +78,7 @@
   USERFORM_USERNAMEMSG=Username:
   USERFORM_PASSWORDMSG=Password:
   USERFORM_PASSWORDCONFIRMMSG=Password (confirm):
  +USERFORM_REMEMBERME=Remember me on this computer
   USERFORM_FIRSTNAMEMSG=First Name:
   USERFORM_LASTNAMEMSG=Last Name:
   USERFORM_EMAILMSG=Email:
  
  
  
  1.55      +18 -1     jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties
  
  Index: JetspeedResources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- JetspeedResources.properties	28 Dec 2001 12:14:07 -0000	1.54
  +++ JetspeedResources.properties	9 Jan 2002 12:14:20 -0000	1.55
  @@ -1,7 +1,7 @@
   ################################################################################
   # Jetspeed Configuration                             
   # Author: Kevin A. Burton (burton@apache.org)
  -# $Id: JetspeedResources.properties,v 1.54 2001/12/28 12:14:07 kimptoc Exp $
  +# $Id: JetspeedResources.properties,v 1.55 2002/01/09 12:14:20 kimptoc Exp $
   ################################################################################
   # This is the main file you will need to configuration Jetspeed.  If there are 
   # any secondary files they will be pointed to from this file.
  @@ -427,6 +427,23 @@
   # Password reminder options
   password.reminder.enable=false
   password.reminder.template=password-reminder.vm
  +
  +# Remember me/auto-logon facility
  +automatic.logon.enable=false
  +#    number of seconds until logon expires (2592000 = 1 month, 30*24*60*60)
  +automatic.logon.cookie.maxage=2592000
  +automatic.logon.cookie.comment=Jetspeed automatic logon cookie
  +#    domain, blank means use getServer to derive it.  Is of the form .foo.com.
  +automatic.logon.cookie.domain=
  +#    path, blank means use getContextPath, default to / - all paths
  +automatic.logon.cookie.path=/
  +#    specifies when the random portion of the cookie is regenerated-
  +#     - firstlogon, means it is only generated the first time the users 
  +#                   requests this feature, useful when you want to allow
  +#                   them to use the feature across computers
  +#     - everylogon, means it is regenerated upon each successful logon
  +#                   useful for getting a little added security (default)
  +automatic.logon.cookie.generation=everylogon
   
   
   #########################################
  
  
  
  1.41      +2 -2      jakarta-jetspeed/webapp/WEB-INF/conf/TurbineResources.properties
  
  Index: TurbineResources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/TurbineResources.properties,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- TurbineResources.properties	25 Nov 2001 20:53:37 -0000	1.40
  +++ TurbineResources.properties	9 Jan 2002 12:14:20 -0000	1.41
  @@ -1,5 +1,5 @@
   # -------------------------------------------------------------------
  -# $Id: TurbineResources.properties,v 1.40 2001/11/25 20:53:37 nacho Exp $
  +# $Id: TurbineResources.properties,v 1.41 2002/01/09 12:14:20 kimptoc Exp $
   #
   # This is the configuration file for Turbine.
   #
  @@ -286,7 +286,7 @@
   
   # This is the default action to log a user out.
   
  -action.logout=LogoutUser
  +action.logout=JLogoutUser
   
   # This is the default action to validate whether or not a session is
   # valid.  For example, if you want to make sure if a user has already
  
  
  
  1.12      +12 -3     jakarta-jetspeed/webapp/WEB-INF/templates/vm/navigations/html/top.vm
  
  Index: top.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/navigations/html/top.vm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- top.vm	28 Dec 2001 15:47:07 -0000	1.11
  +++ top.vm	9 Jan 2002 12:14:20 -0000	1.12
  @@ -55,7 +55,7 @@
             </tr>
             <tr>
               <td align="right" style="font-size:10">
  -              <a href="$link.setAction("LogoutUser")" style="font-size:10">$l10n.TOP_LOGOUT</a>
  +              <a href="$link.setAction($config.getString("action.logout"))" style="font-size:10">$l10n.TOP_LOGOUT</a>
               </td>
             </tr>
             ## Leave space between last line and content
  @@ -102,9 +102,9 @@
                   <input value="" name="username" maxlength="25" type="text" tabindex="1"
style="font-size:10">
                 </td>
                 <td rowspan="2" align="center">
  -                <input name="submit" type="submit" value="$l10n.USERFORM_LOGIN" tabindex="3"
 style="font-size:10" />
  +                <input name="submit" type="submit" value="$l10n.USERFORM_LOGIN" tabindex="4"
 style="font-size:10" />
   #if ( $config.getBoolean("password.reminder.enable") == true )
  -                <input name="eventSubmit_doReminder" type="submit" tabindex="4" value="$l10n.USERFORM_PASSWORDSEND"
style="font-size:10" >
  +                <input name="eventSubmit_doReminder" type="submit" tabindex="5" value="$l10n.USERFORM_PASSWORDSEND"
style="font-size:10" >
                   <br><small>$l10n.USERFORM_PASSWORDREMINDER</small>
   #end
   
  @@ -117,6 +117,15 @@
                   <input value="" name="password" maxlength="25" type="password" tabindex="2"
style="font-size:10">
                 </td>
               </tr>
  +
  +#if ( $config.getBoolean("automatic.logon.enable") == true )
  +            <tr>
  +              <td style="font-size:10" colspan="2">
  +                <input name="rememberme" value="true" type="checkbox" tabindex="3" />$l10n.USERFORM_REMEMBERME
  +              </td>
  +            </tr>
  +#end
  +
               #if( $config.getBoolean("topnav.user_creation.enable") == true)
               <tr>
                 <td align="center" colspan="3">
  
  
  
  1.7       +11 -0     jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html/EditAccount.vm
  
  Index: EditAccount.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html/EditAccount.vm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EditAccount.vm	18 Dec 2001 06:29:36 -0000	1.6
  +++ EditAccount.vm	9 Jan 2002 12:14:20 -0000	1.7
  @@ -41,6 +41,17 @@
                       <input name="password_confirm" type="PASSWORD" value="">
                     </td>
                   </tr>
  +#if ( $config.getBoolean("automatic.logon.enable") == true )
  +                <tr>
  +                  <td colspan="3">
  +                    <input name="rememberme" value="true" type="checkbox" 
  +#if ( $data.getCookies().get("logincookie") )
  +                        checked
  +#end
  +                    />$l10n.USERFORM_REMEMBERME
  +                  </td>
  +                </tr>
  +#end
                   <tr>
                     <td>$l10n.USERFORM_FIRSTNAMEMSG</td>
                     <td>&nbsp;</td>
  
  
  
  1.4       +11 -4     jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html/Login.vm
  
  Index: Login.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html/Login.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Login.vm	27 Dec 2001 14:51:10 -0000	1.3
  +++ Login.vm	9 Jan 2002 12:14:20 -0000	1.4
  @@ -11,21 +11,28 @@
       #end
       <table border="0" cellspacing="2" cellpadding="1">
         <tr>
  -        <td>Username:</td>
  +        <td>$l10n.LOGIN_USERNAME</td>
           <td><input size="12" value="$!data.Parameters.getString("username")" name="username"
maxlength="25" type="text" /></td>
         </tr>
         <tr>
  -        <td>Password:</td>
  +        <td>$l10n.LOGIN_PASSWORD</td>
           <td><input size="12" value="" name="password" maxlength="25" type="password"
/></td>
         </tr>
  +#if ( $config.getBoolean("automatic.logon.enable") == true )
  +      <tr>
  +        <td colspan="2">
  +          <input name="rememberme" value="true" type="checkbox" />$l10n.LOGIN_REMEMBERME
  +        </td>
  +      </tr>
  +#end
         <tr>
           <td colspan="2" align="center">
  -          <input name="submit" type="submit" value="Login" />
  +          <input name="submit" type="submit" value="$l10n.LOGIN_LOGIN" />
           </td>
         </tr>
         <tr>
           <td colspan="2" align="center">
  -          <small><a href="$link.setPage("NewAccount")">Create a new account</a></small>
  +          <small><a href="$link.setPage("NewAccount")">$l10n.LOGIN_NEW_ACCOUNT</a></small>
           </td>
         </tr>
       </table>
  
  
  
  1.9       +4 -1      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- changes.xml	3 Jan 2002 09:27:51 -0000	1.8
  +++ changes.xml	9 Jan 2002 12:14:20 -0000	1.9
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
   <!--
  -$Id: changes.xml,v 1.8 2002/01/03 09:27:51 kimptoc Exp $
  +$Id: changes.xml,v 1.9 2002/01/09 12:14:20 kimptoc Exp $
   -->
   <document>
     <properties>
  @@ -45,6 +45,9 @@
   </li>
   <li>
     Fix - Bug # 5604 - Maximize now sticks until the user does a Restore or logs out (CK)
  +</li>
  +<li>
  +  Add - Bug # 4191 - Automatic Logon/Remember me facility (CK)
   </li>
   
         </ul>
  
  
  

--
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