directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1495491 - in /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor: PasswordPoliciesPage.java PasswordPolicyDetailsPage.java
Date Fri, 21 Jun 2013 16:09:06 GMT
Author: pamarcelot
Date: Fri Jun 21 16:09:06 2013
New Revision: 1495491

URL: http://svn.apache.org/r1495491
Log:
Added configuration for the new 'ads-pwdValidator' in the Password Policy Details editor page.

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java?rev=1495491&r1=1495490&r2=1495491&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesPage.java
Fri Jun 21 16:09:06 2013
@@ -190,6 +190,8 @@ public class PasswordPoliciesPage extend
             passwordPolicy.setPwdMinDelay( 0 );
             passwordPolicy.setPwdMaxDelay( 0 );
             passwordPolicy.setPwdMaxIdle( 0 );
+            passwordPolicy
+                .setPwdValidator( "org.apache.directory.server.core.api.authn.ppolicy.DefaultPasswordValidator"
);
 
             // Adding the password policy to the authentication interceptor
             authenticationInterceptor.addPasswordPolicies( passwordPolicy );

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java?rev=1495491&r1=1495490&r2=1495491&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPolicyDetailsPage.java
Fri Jun 21 16:09:06 2013
@@ -71,6 +71,7 @@ public class PasswordPolicyDetailsPage i
     private Text idText;
     private Text descriptionText;
     private ComboViewer checkQualityComboViewer;
+    private Text validatorText;
     private Button minimumLengthCheckbox;
     private Text minimumLengthText;
     private Button maximumLengthCheckbox;
@@ -289,8 +290,8 @@ public class PasswordPolicyDetailsPage i
         // Creation of the section
         Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR
);
         section.marginWidth = 10;
-        section.setText( "Replication Consumer Details" );
-        section.setDescription( "Set the properties of the replication consumer." );
+        section.setText( "Password Policy Details" );
+        section.setDescription( "Set the properties of the password policy." );
         TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
         td.grabHorizontal = true;
         section.setLayoutData( td );
@@ -347,6 +348,11 @@ public class PasswordPolicyDetailsPage i
         checkQualityComboViewer.getControl().setLayoutData(
             new GridData( SWT.FILL, SWT.CENTER, true, false ) );
 
+        // Validator
+        toolkit.createLabel( composite, "Validator:" );
+        validatorText = toolkit.createText( composite, "" );
+        validatorText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+
         // Minimum Length (pwdMinLength)
         minimumLengthCheckbox = toolkit.createButton( composite, "Enable Mimimum Length",
SWT.CHECK );
         minimumLengthCheckbox.setLayoutData( new GridData( SWT.BEGINNING, SWT.CENTER, false,
false, 2, 1 ) );
@@ -551,6 +557,7 @@ public class PasswordPolicyDetailsPage i
         descriptionText.addModifyListener( textModifyListener );
         checkQualityComboViewer.addSelectionChangedListener( viewerSelectionChangedListener
);
         checkQualityComboViewer.addSelectionChangedListener( checkQualityComboViewerSelectionChangedListener
);
+        validatorText.addModifyListener( textModifyListener );
         minimumLengthCheckbox.addSelectionListener( buttonSelectionListener );
         minimumLengthCheckbox.addSelectionListener( minimumLengthCheckboxSelectionListener
);
         minimumLengthText.addModifyListener( textModifyListener );
@@ -606,6 +613,7 @@ public class PasswordPolicyDetailsPage i
         descriptionText.removeModifyListener( textModifyListener );
         checkQualityComboViewer.removeSelectionChangedListener( viewerSelectionChangedListener
);
         checkQualityComboViewer.removeSelectionChangedListener( checkQualityComboViewerSelectionChangedListener
);
+        validatorText.removeModifyListener( textModifyListener );
         minimumLengthCheckbox.removeSelectionListener( buttonSelectionListener );
         minimumLengthCheckbox.removeSelectionListener( minimumLengthCheckboxSelectionListener
);
         minimumLengthText.removeModifyListener( textModifyListener );
@@ -689,6 +697,10 @@ public class PasswordPolicyDetailsPage i
             // Check Quality
             passwordPolicy.setPwdCheckQuality( getPwdCheckQuality() );
 
+            // Validator
+            passwordPolicy
+                .setPwdValidator( ServerConfigurationEditorUtils.checkEmptyString( validatorText.getText()
) );
+
             // Miminum Length
             if ( minimumLengthCheckbox.getSelection() )
             {
@@ -955,6 +967,9 @@ public class PasswordPolicyDetailsPage i
             checkQualityComboViewer.setSelection( new StructuredSelection( CheckQuality.valueOf(
passwordPolicy
                 .getPwdCheckQuality() ) ) );
 
+            // Validator
+            validatorText.setText( ServerConfigurationEditorUtils.checkNull( passwordPolicy.getPwdValidator()
) );
+
             // Miminum Length
             int minimumLength = passwordPolicy.getPwdMinLength();
             minimumLengthCheckbox.setSelection( minimumLength != 0 );



Mime
View raw message