directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1479512 - in /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor: PasswordPoliciesMasterDetailsBlock.java PasswordPoliciesPage.java
Date Mon, 06 May 2013 10:12:16 GMT
Author: pamarcelot
Date: Mon May  6 10:12:11 2013
New Revision: 1479512

URL: http://svn.apache.org/r1479512
Log:
Added default parameters to the "default" and the created password policies configurations.

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

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.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/PasswordPoliciesMasterDetailsBlock.java?rev=1479512&r1=1479511&r2=1479512&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PasswordPoliciesMasterDetailsBlock.java
Mon May  6 10:12:11 2013
@@ -89,6 +89,7 @@ public class PasswordPoliciesMasterDetai
         this.page = page;
     }
 
+
     /**
      * {@inheritDoc}
      */
@@ -100,6 +101,7 @@ public class PasswordPoliciesMasterDetai
             { 40, 60 } );
     }
 
+
     /**
      * {@inheritDoc}
      */
@@ -146,7 +148,7 @@ public class PasswordPoliciesMasterDetai
                 if ( element instanceof PasswordPolicyBean )
                 {
                     PasswordPolicyBean passwordPolicy = ( PasswordPolicyBean ) element;
-                    
+
                     if ( passwordPolicy.isEnabled() )
                     {
                         return NLS.bind( "{0} (enabled)", passwordPolicy.getPwdId() );
@@ -313,13 +315,36 @@ public class PasswordPoliciesMasterDetai
      */
     private void addNewPasswordPolicy()
     {
+        // Getting a new ID for the password policy
         String newId = getNewId();
 
+        // Creating and configuring the new password policy
         PasswordPolicyBean newPasswordPolicy = new PasswordPolicyBean();
         newPasswordPolicy.setPwdId( newId );
-        // TODO initialize default values
+        newPasswordPolicy.setPwdMaxAge( 0 );
+        newPasswordPolicy.setPwdFailureCountInterval( 30 );
+        newPasswordPolicy.setPwdAttribute( "userPassword" );
+        newPasswordPolicy.setPwdMaxFailure( 5 );
+        newPasswordPolicy.setPwdLockout( true );
+        newPasswordPolicy.setPwdMustChange( false );
+        newPasswordPolicy.setPwdLockoutDuration( 0 );
+        newPasswordPolicy.setPwdMinLength( 5 );
+        newPasswordPolicy.setPwdInHistory( 5 );
+        newPasswordPolicy.setPwdExpireWarning( 600 );
+        newPasswordPolicy.setPwdMinAge( 0 );
+        newPasswordPolicy.setPwdAllowUserChange( true );
+        newPasswordPolicy.setPwdGraceAuthNLimit( 5 );
+        newPasswordPolicy.setPwdCheckQuality( 1 );
+        newPasswordPolicy.setPwdMaxLength( 0 );
+        newPasswordPolicy.setPwdGraceExpire( 0 );
+        newPasswordPolicy.setPwdMinDelay( 0 );
+        newPasswordPolicy.setPwdMaxDelay( 0 );
+        newPasswordPolicy.setPwdMaxIdle( 0 );
 
+        // Adding the new password policy to the authentication interceptor
         getAuthenticationInterceptor().addPasswordPolicies( newPasswordPolicy );
+        
+        // Updating the UI and editor
         viewer.refresh();
         viewer.setSelection( new StructuredSelection( newPasswordPolicy ) );
         setEditorDirty();
@@ -398,8 +423,7 @@ public class PasswordPoliciesMasterDetai
      */
     protected void createToolBarActions( IManagedForm managedForm )
     {
-        // TODO Auto-generated method stub
-
+        // No toolbar needed.
     }
 
 

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=1479512&r1=1479511&r2=1479512&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
Mon May  6 10:12:11 2013
@@ -171,8 +171,25 @@ public class PasswordPoliciesPage extend
 
             // Configuring the password policy
             passwordPolicy.setPwdId( PASSWORD_POLICY_ID_DEFAULT );
-
-            // TODO add other parameters
+            passwordPolicy.setPwdMaxAge( 0 );
+            passwordPolicy.setPwdFailureCountInterval( 30 );
+            passwordPolicy.setPwdAttribute( "userPassword" );
+            passwordPolicy.setPwdMaxFailure( 5 );
+            passwordPolicy.setPwdLockout( true );
+            passwordPolicy.setPwdMustChange( false );
+            passwordPolicy.setPwdLockoutDuration( 0 );
+            passwordPolicy.setPwdMinLength( 5 );
+            passwordPolicy.setPwdInHistory( 5 );
+            passwordPolicy.setPwdExpireWarning( 600 );
+            passwordPolicy.setPwdMinAge( 0 );
+            passwordPolicy.setPwdAllowUserChange( true );
+            passwordPolicy.setPwdGraceAuthNLimit( 5 );
+            passwordPolicy.setPwdCheckQuality( 1 );
+            passwordPolicy.setPwdMaxLength( 0 );
+            passwordPolicy.setPwdGraceExpire( 0 );
+            passwordPolicy.setPwdMinDelay( 0 );
+            passwordPolicy.setPwdMaxDelay( 0 );
+            passwordPolicy.setPwdMaxIdle( 0 );
 
             // Adding the password policy to the authentication interceptor
             authenticationInterceptor.addPasswordPolicies( passwordPolicy );



Mime
View raw message