portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morci...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine TurbineUserManagement.java
Date Tue, 03 Dec 2002 23:13:12 GMT
morciuch    2002/12/03 15:13:12

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        UpdateAccount.java
               src/java/org/apache/jetspeed/services/security/turbine
                        TurbineUserManagement.java
  Log:
  Modified changePassword method to display correct localized error message upon exception
  
  Revision  Changes    Path
  1.19      +1 -1      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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- UpdateAccount.java	20 Nov 2002 16:20:47 -0000	1.18
  +++ UpdateAccount.java	3 Dec 2002 23:13:12 -0000	1.19
  @@ -295,7 +295,7 @@
                 JetspeedSecurity.changePassword(data.getJetspeedUser(),oldPassword, password);
               } catch (JetspeedSecurityException e)
               {
  -                data.setMessage(Localization.getString("UPDATEACCOUNT_BADOLDPASSWORD"));
  +                data.setMessage(e.getMessage());
                   backToEditAccount( data, screenData );
                   return;
               }
  
  
  
  1.8       +4 -6      jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine/TurbineUserManagement.java
  
  Index: TurbineUserManagement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/turbine/TurbineUserManagement.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TurbineUserManagement.java	8 Nov 2002 10:05:18 -0000	1.7
  +++ TurbineUserManagement.java	3 Dec 2002 23:13:12 -0000	1.8
  @@ -97,6 +97,7 @@
   import org.apache.jetspeed.services.security.JetspeedSecurityException;
   import org.apache.jetspeed.services.rundata.JetspeedRunDataService;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
  +import org.apache.turbine.services.localization.Localization;
   import org.apache.turbine.services.rundata.RunDataService;
   
   // Password encryption
  @@ -430,14 +431,11 @@
           String encrypted = JetspeedSecurity.encryptPassword(oldPassword);
           if(!accountExists(user))
           {
  -            throw new UnknownUserException("The account '" +
  -                user.getUserName() + "' does not exist");
  +            throw new UnknownUserException(Localization.getString("UPDATEACCOUNT_NOUSER"));
           }
           if(!user.getPassword().equals(encrypted))
           {
  -            throw new UserException(
  -                "The supplied old password for '" + user.getUserName() +
  -                "' was incorrect");
  +            throw new UserException(Localization.getString("UPDATEACCOUNT_BADOLDPASSWORD"));
           }
           user.setPassword(JetspeedSecurity.encryptPassword(newPassword));
   
  
  
  

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