directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1602629 - in /directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password: PasswordDialog.java messages.properties messages_de.properties messages_fr.properties
Date Sat, 14 Jun 2014 23:06:34 GMT
Author: seelmann
Date: Sat Jun 14 23:06:33 2014
New Revision: 1602629

URL: http://svn.apache.org/r1602629
Log:
DIRSTUDIO-937: Added password confirmation

Modified:
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages.properties
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_de.properties
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_fr.properties

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java?rev=1602629&r1=1602628&r2=1602629&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java
Sat Jun 14 23:06:33 2014
@@ -135,6 +135,7 @@ public class PasswordDialog extends Dial
     private TabItem newPasswordTab;
     private Composite newPasswordComposite;
     private Text newPasswordText;
+    private Text confirmNewPasswordText;
     private ComboViewer newPasswordHashMethodComboViewer;
     private Text newPasswordPreviewText;
     private Text newPasswordPreviewValueHexText;
@@ -425,6 +426,11 @@ public class PasswordDialog extends Dial
         BaseWidgetUtils.createLabel( newPasswordComposite, Messages.getString( "PasswordDialog.EnterNewPassword"
), 1 ); //$NON-NLS-1$
         newPasswordText = BaseWidgetUtils.createText( newPasswordComposite, "", 1 ); //$NON-NLS-1$
 
+        // Confirm new password text
+        BaseWidgetUtils
+            .createLabel( newPasswordComposite, Messages.getString( "PasswordDialog.ConfirmNewPassword"
), 1 ); //$NON-NLS-1$
+        confirmNewPasswordText = BaseWidgetUtils.createText( newPasswordComposite, "", 1
); //$NON-NLS-1$
+
         // New password hashing method combo
         BaseWidgetUtils.createLabel( newPasswordComposite, Messages.getString( "PasswordDialog.SelectHashMethod"
), 1 ); //$NON-NLS-1$
         newPasswordHashMethodComboViewer = new ComboViewer( newPasswordComposite );
@@ -537,6 +543,14 @@ public class PasswordDialog extends Dial
             }
         } );
 
+        confirmNewPasswordText.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                updateNewPasswordGroup();
+            }
+        } );
+
         newPasswordHashMethodComboViewer.addSelectionChangedListener( new ISelectionChangedListener()
         {
             public void selectionChanged( SelectionChangedEvent event )
@@ -686,7 +700,8 @@ public class PasswordDialog extends Dial
     {
         // set new password to the UI widgets
         newPassword = new Password( getSelectedNewPasswordHashMethod(), newPasswordText.getText()
);
-        if ( !"".equals( newPasswordText.getText() ) ) //$NON-NLS-1$
+        if ( !"".equals( newPasswordText.getText() ) //$NON-NLS-1$
+            && newPasswordText.getText().equals( confirmNewPasswordText.getText()
) )
         {
             newPasswordPreviewValueHexText
                 .setText( Utils.getNonNullString( newPassword.getHashedPasswordAsHexString()
) );
@@ -710,6 +725,7 @@ public class PasswordDialog extends Dial
         if ( showNewPasswordDetailsButton.getSelection() )
         {
             newPasswordText.setEchoChar( '\0' );
+            confirmNewPasswordText.setEchoChar( '\0' );
             newPasswordPreviewText.setEchoChar( '\0' );
             newPasswordPreviewValueHexText.setEchoChar( '\0' );
             newPasswordPreviewSaltHexText.setEchoChar( '\0' );
@@ -717,6 +733,7 @@ public class PasswordDialog extends Dial
         else
         {
             newPasswordText.setEchoChar( '\u2022' );
+            confirmNewPasswordText.setEchoChar( '\u2022' );
             newPasswordPreviewText.setEchoChar( newPasswordPreviewText.getText()
                 .equals( Utils.getNonNullString( null ) ) ? '\0' : '\u2022' );
             newPasswordPreviewValueHexText.setEchoChar( newPasswordPreviewValueHexText.getText().equals(

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages.properties?rev=1602629&r1=1602628&r2=1602629&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages.properties
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages.properties
Sat Jun 14 23:06:33 2014
@@ -21,6 +21,7 @@ PasswordDialog.BindDn=Bind DN:
 PasswordDialog.CheckAuthentication=Check Authentication
 PasswordDialog.CurrentPassword=Current Password
 PasswordDialog.EnterNewPassword=Enter New Password:
+PasswordDialog.ConfirmNewPassword=Confirm New Password:
 PasswordDialog.HashMethod=Hash Method:
 PasswordDialog.NewPassword=New Password
 PasswordDialog.NewSalt=New Salt

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_de.properties?rev=1602629&r1=1602628&r2=1602629&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_de.properties
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_de.properties
Sat Jun 14 23:06:33 2014
@@ -21,6 +21,7 @@ PasswordDialog.BindDn=Bind DN:
 PasswordDialog.CheckAuthentication=\u00DCberpr\u00FCfe Authentisierung
 PasswordDialog.CurrentPassword=Aktuelles Passwort
 PasswordDialog.EnterNewPassword=Neues Passwort eingeben:
+PasswordDialog.ConfirmNewPassword=Neues Passwort best\u00E4tigen:
 PasswordDialog.NewPassword=Neues Passwort
 PasswordDialog.NewSalt=Neuer Salt
 PasswordDialog.PasswordEditor=Passwort Editor

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_fr.properties?rev=1602629&r1=1602628&r2=1602629&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_fr.properties
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/messages_fr.properties
Sat Jun 14 23:06:33 2014
@@ -21,6 +21,7 @@ PasswordDialog.BindDn=Bind DN:
 PasswordDialog.CheckAuthentication=Contr\u00F4le de l'authentification
 PasswordDialog.CurrentPassword=Mot de passe actuel
 PasswordDialog.EnterNewPassword=Entrez le nouveau mot de passe:
+PasswordDialog.ConfirmNewPassword=TODO: Confirm New Password:
 PasswordDialog.HashMethod=M\u00E9thode de hachage:
 PasswordDialog.NewPassword=Nouveau mot de passe
 PasswordDialog.NewSalt=Nouvel 'assaisonnement'



Mime
View raw message