[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel DSEntrySet.java, 1.1.1.1, 1.2 PasswordPolicyPanel.java, 1.1.1.1, 1.2

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Wed Feb 15 23:01:03 UTC 2006


Author: nkinder

Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27837/panel

Modified Files:
	DSEntrySet.java PasswordPolicyPanel.java 
Log Message:
Bug(s) fixed: 181570
Bug Description: The UI for the new password syntax enhancements needs to be created.
Reviewed by: Rich, Noriko (thanks!)
Files: see diffs
Branch: HEAD (directoryconsole)
Fix Description: This adds input fields for the new password syntax config parameters.  The
  new fields are added uder the "Configuration->Data->Passwords" tab.  This revised set of
  diffs fixes an issue where the default values when setting up a per-user or per-subtree password
  policy were all showing up as 0.  This was due to DSEntrySet overwriting the default component
  values with a null string if the passwordPolicy LDAP entry did not exist.
Flag Day: no
Doc impact: no
QA impact: Console testplan will need to be updated.
New Tests integrated into TET: none



Index: DSEntrySet.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/DSEntrySet.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSEntrySet.java	18 Jul 2005 00:55:55 -0000	1.1.1.1
+++ DSEntrySet.java	15 Feb 2006 23:00:55 -0000	1.2
@@ -152,73 +152,75 @@
             // collect all attribute names for this entry into an array
             String[] attrNames = getAttributeNames(dn);
             Debug.println(9, "DSEntrySet.getAttributes(): attempting to read entry " +
-						  dn + " from the server attrNames = " + attrNames);
-			try {
-				entry = ldc.read(dn, attrNames);
-			} catch (LDAPException lde) {
-				if ( lde.getLDAPResultCode() == lde.NO_SUCH_OBJECT &&
-					 _allowNoEntry ) {
-					entry = null;
-				} else {
-					throw lde;
-				}
-			}
-			if ( entry == null && !_allowNoEntry ) {
-				Debug.println( "DSEntrySet.getAttribytes: failed to read " +
-							   dn );
-				return false;
-			} else {
-//				Debug.println( "DSEntrySet.getAttributes(): entry = " + entry );
-			}
+                           dn + " from the server attrNames = " + attrNames);
+            try {
+                entry = ldc.read(dn, attrNames);
+            } catch (LDAPException lde) {
+                if ( lde.getLDAPResultCode() == lde.NO_SUCH_OBJECT && _allowNoEntry ) {
+                    entry = null;
+                } else {
+                    throw lde;
+                }
+            }
+
+            if ( entry == null && !_allowNoEntry ) {
+                Debug.println( "DSEntrySet.getAttribytes: failed to read " + dn );
+                return false;
+            } else {
+                // Debug.println( "DSEntrySet.getAttributes(): entry = " + entry );
+            }
+
+            Debug.println("DSEntrySet.getAttributes(): read entry from DS:" + entry);
+            Debug.println("DSEntrySet.getAttributes(): attributes for this entry:" + attrNames);
 
-            Debug.println("DSEntrySet.getAttributes(): read entry from DS:" +
-						  entry);
-            Debug.println("DSEntrySet.getAttributes(): attributes for this entry:" +
-						  attrNames);
             // now we have the entry; get the LDAPAttributes
-			boolean haveAllAttrs = true; // flag if any attribues were missing
+            boolean haveAllAttrs = true; // flag if any attribues were missing
             for (int ii = 0; ii < attrNames.length; ++ii) {
                 String attrName = attrNames[ii];
                 LDAPAttribute lda = null;
-				if (entry != null) {
-					lda = entry.getAttribute(attrName);
-				}
+                if (entry != null) {
+                    lda = entry.getAttribute(attrName);
+                }
+
                 if (lda == null && entry != null) {
-					Debug.println( "DSEntrySet.getAttributes(): failed to get " +
-								   "attribute " + attrName + " in " + entry.getDN());
-					haveAllAttrs = false; // missing at least one attr value
-				}
+                    Debug.println( "DSEntrySet.getAttributes(): failed to get " +
+                                   "attribute " + attrName + " in " + entry.getDN());
+                    haveAllAttrs = false; // missing at least one attr value
+                }
 
-				// loop through all of the DSEntrys which
-				// correspond to this attribute name and do the
-				// remoteToLocal for each one
-				Vector v = (Vector)_attrNametoDSAVectorMap.get(attrName);
-				for (int jj = 0; v != null && jj < v.size(); ++jj) {
-					IDSEntry dse = (IDSEntry)v.elementAt(jj);
-					if (lda != null) {
-						dse.remoteToLocal(lda.getStringValues());
-					} else {
-						dse.remoteToLocal(""); // dummy empty value
-					}
-//                  Debug.println("DSEntrySet.show(): set DSE" +
-//                                " for attribute" + attrName +
-//                                " to value=" + lda);
-//                  Debug.println("DSEntrySet.show(): new val=" +
-//                                dse);
-					dse.show();
-				}
-			}
-			if (!haveAllAttrs) {
-				Debug.println("DSEntrySet.show(): some of the attributes of " +
-							  entry.getDN() + " could not be read.  Either they " +
-							  "are not present in the entry or there is an ACI " +
-							  "which prevents that attribute from being read. " +
-							  "Try authenticating as a user with more access");
-				if (_validate)
-					return false;
-			}
-        }
-		return true;
+                // loop through all of the DSEntrys which
+                // correspond to this attribute name and do the
+                // remoteToLocal for each one that was found
+                Vector v = (Vector)_attrNametoDSAVectorMap.get(attrName);
+                for (int jj = 0; v != null && jj < v.size(); ++jj) {
+                    IDSEntry dse = (IDSEntry)v.elementAt(jj);
+                    if (lda != null) {
+                        Debug.println("DSEntrySet.getAttributes(): " + attrName  + 
+                                      " was found, setting value from entry");
+                        dse.remoteToLocal(lda.getStringValues());
+                    }
+
+                    // Debug.println("DSEntrySet.show(): set DSE" +
+                    //               " for attribute" + attrName +
+                    //               " to value=" + lda);
+                    // Debug.println("DSEntrySet.show(): new val=" + dse);
+
+                    dse.show();
+                }
+            }
+
+            if (!haveAllAttrs) {
+                Debug.println("DSEntrySet.show(): some of the attributes of " +
+                               entry.getDN() + " could not be read.  Either they " +
+                              "are not present in the entry or there is an ACI " +
+                              "which prevents that attribute from being read. " +
+                              "Try authenticating as a user with more access");
+                if (_validate)
+                    return false;
+                }
+            }
+
+            return true;
     }
 
     /**


Index: PasswordPolicyPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/PasswordPolicyPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- PasswordPolicyPanel.java	18 Jul 2005 00:56:02 -0000	1.1.1.1
+++ PasswordPolicyPanel.java	15 Feb 2006 23:00:55 -0000	1.2
@@ -28,6 +28,7 @@
 import com.netscape.admin.dirserv.*;
 import com.netscape.management.client.*;
 import com.netscape.management.client.util.*;
+import com.netscape.management.nmclf.*;
 import netscape.ldap.*;
 import netscape.ldap.util.*;
 
@@ -90,8 +91,7 @@
        	createChangeArea((Container)_myPanel);
        	createExpirationArea((Container)_myPanel);
        	createSyntaxArea((Container)_myPanel);
-       	createMinLengthArea((Container)_myPanel);
-	   	createStorageArea((Container)_myPanel);
+        createStorageArea((Container)_myPanel);
 
         addBottomGlue ();
 		_isInitialized = true;
@@ -254,46 +254,231 @@
 
     protected void createSyntaxArea( Container myContainer ) {
         _cbCheckSyntax = makeJCheckBox(_section, "check", false);
-        DSEntrySet entries = getDSEntrySet();
-		DSEntryBoolean se = new DSEntryBoolean( "off", _cbCheckSyntax );
-        entries.add( _policyspecdn, SYNTAX_ATTR_NAME, se );
-		setComponentTable(_cbCheckSyntax, se);		
 
-		GridBagConstraints gbc = getGBC();
-		gbc.gridwidth = gbc.REMAINDER;
-		gbc.anchor = gbc.WEST;
-        gbc.fill = gbc.NONE;
-        gbc.weightx = 1.0;
-        myContainer.add(_cbCheckSyntax, gbc);
-    }
-
-    protected void createMinLengthArea( Container myContainer ) {
         _minLengthLabel = makeJLabel(_section, "minlength");
 
         _tfMinLengthValue = makeNumericalJTextField(_section, "minlength");
-		_minLengthLabel.setLabelFor(_tfMinLengthValue);
+                _minLengthLabel.setLabelFor(_tfMinLengthValue);
+
+        _minDigitsLabel = makeJLabel(_section, "mindigits");
+
+        _tfMinDigitsValue = makeNumericalJTextField(_section, "mindigits");
+                _minDigitsLabel.setLabelFor(_tfMinDigitsValue);
+
+        _minAlphasLabel = makeJLabel(_section, "minalphas");
+
+        _tfMinAlphasValue = makeNumericalJTextField(_section, "minalphas");
+                _minAlphasLabel.setLabelFor(_tfMinAlphasValue);
+
+        _minUppersLabel = makeJLabel(_section, "minuppers");
+
+        _tfMinUppersValue = makeNumericalJTextField(_section, "minuppers");
+                _minUppersLabel.setLabelFor(_tfMinUppersValue);
+
+        _minLowersLabel = makeJLabel(_section, "minlowers");
+
+        _tfMinLowersValue = makeNumericalJTextField(_section, "minlowers");
+                _minLowersLabel.setLabelFor(_tfMinLowersValue);
+
+        _minSpecialsLabel = makeJLabel(_section, "minspecials");
+
+        _tfMinSpecialsValue = makeNumericalJTextField(_section, "minspecials");
+                _minSpecialsLabel.setLabelFor(_tfMinSpecialsValue);
+
+        _min8bitLabel = makeJLabel(_section, "min8bit");
+
+        _tfMin8bitValue = makeNumericalJTextField(_section, "min8bit");
+                _min8bitLabel.setLabelFor(_tfMin8bitValue);
+
+        _maxRepeatsLabel = makeJLabel(_section, "maxrepeats");
 
+        _tfMaxRepeatsValue =  makeNumericalJTextField(_section, "maxrepeats");
+                _maxRepeatsLabel.setLabelFor(_tfMaxRepeatsValue);
+
+        _minCategoriesLabel = makeJLabel(_section, "mincategories");
+
+        _tfMinCategoriesValue = makeNumericalJTextField(_section, "mincategories");
+                _minCategoriesLabel.setLabelFor(_tfMinCategoriesValue);
+
+        _minTokenLengthLabel = makeJLabel(_section, "mintokenlength");
+
+        _tfMinTokenLengthValue = makeNumericalJTextField(_section, "mintokenlength");
+                _minTokenLengthLabel.setLabelFor(_tfMinTokenLengthValue);
+
+        // tie components to config attributes
         DSEntrySet entries = getDSEntrySet();
-        DSEntryInteger minDSEntry = new DSEntryInteger("", _tfMinLengthValue,
-            _minLengthLabel,MINLENGTH_MIN_VAL, MINLENGTH_MAX_VAL, 1);
-        entries.add(_policyspecdn, MINLENGTH_ATTR_NAME, minDSEntry);
-        setComponentTable(_tfMinLengthValue, minDSEntry);
+
+        DSEntryBoolean se = new DSEntryBoolean( "off", _cbCheckSyntax );
+        entries.add( _policyspecdn, SYNTAX_ATTR_NAME, se );
+                setComponentTable(_cbCheckSyntax, se);
+
+        DSEntryInteger minLengthDSEntry = new DSEntryInteger(MINLENGTH_DEFAULT_VAL,
+            _tfMinLengthValue, _minLengthLabel, MINLENGTH_MIN_VAL, MINLENGTH_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINLENGTH_ATTR_NAME, minLengthDSEntry);
+        setComponentTable(_tfMinLengthValue, minLengthDSEntry);
+
+        DSEntryInteger minDigitsDSEntry = new DSEntryInteger(MINDIGITS_DEFAULT_VAL,
+            _tfMinDigitsValue, _minDigitsLabel, MINDIGITS_MIN_VAL, MINDIGITS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINDIGITS_ATTR_NAME, minDigitsDSEntry);
+        setComponentTable(_tfMinDigitsValue, minDigitsDSEntry);
+
+        DSEntryInteger minAlphasDSEntry = new DSEntryInteger(MINALPHAS_DEFAULT_VAL,
+            _tfMinAlphasValue, _minAlphasLabel, MINALPHAS_MIN_VAL, MINALPHAS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINALPHAS_ATTR_NAME, minAlphasDSEntry);
+        setComponentTable(_tfMinAlphasValue, minAlphasDSEntry);
+
+        DSEntryInteger minUppersDSEntry = new DSEntryInteger(MINUPPERS_DEFAULT_VAL,
+            _tfMinUppersValue, _minUppersLabel, MINUPPERS_MIN_VAL, MINUPPERS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINUPPERS_ATTR_NAME, minUppersDSEntry);
+        setComponentTable(_tfMinUppersValue, minUppersDSEntry);
+
+        DSEntryInteger minLowersDSEntry = new DSEntryInteger(MINLOWERS_DEFAULT_VAL,
+            _tfMinLowersValue, _minLowersLabel, MINLOWERS_MIN_VAL, MINLOWERS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINLOWERS_ATTR_NAME, minLowersDSEntry);
+        setComponentTable(_tfMinLowersValue, minLowersDSEntry);
+
+        DSEntryInteger minSpecialsDSEntry = new DSEntryInteger(MINSPECIALS_DEFAULT_VAL,
+            _tfMinSpecialsValue, _minSpecialsLabel, MINSPECIALS_MIN_VAL, MINSPECIALS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINSPECIALS_ATTR_NAME, minSpecialsDSEntry);
+        setComponentTable(_tfMinSpecialsValue, minSpecialsDSEntry);
+
+        DSEntryInteger min8bitDSEntry = new DSEntryInteger(MIN8BIT_DEFAULT_VAL,
+            _tfMin8bitValue, _min8bitLabel,MIN8BIT_MIN_VAL, MIN8BIT_MAX_VAL, 1);
+        entries.add(_policyspecdn, MIN8BIT_ATTR_NAME, min8bitDSEntry);
+        setComponentTable(_tfMin8bitValue, min8bitDSEntry);
+
+        DSEntryInteger maxRepeatsDSEntry = new DSEntryInteger(MAXREPEATS_DEFAULT_VAL,
+            _tfMaxRepeatsValue, _maxRepeatsLabel,MAXREPEATS_MIN_VAL, MAXREPEATS_MAX_VAL, 1);
+        entries.add(_policyspecdn, MAXREPEATS_ATTR_NAME, maxRepeatsDSEntry);
+        setComponentTable(_tfMaxRepeatsValue, maxRepeatsDSEntry);
+
+        DSEntryInteger minCategoriesDSEntry = new DSEntryInteger(MINCATEGORIES_DEFAULT_VAL,
+            _tfMinCategoriesValue, _minCategoriesLabel,MINCATEGORIES_MIN_VAL, MINCATEGORIES_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINCATEGORIES_ATTR_NAME, minCategoriesDSEntry);
+        setComponentTable(_tfMinCategoriesValue, minCategoriesDSEntry);
+
+        DSEntryInteger minTokenLengthDSEntry = new DSEntryInteger(MINTOKENLENGTH_DEFAULT_VAL,
+            _tfMinTokenLengthValue, _minTokenLengthLabel,MINTOKENLENGTH_MIN_VAL, MINTOKENLENGTH_MAX_VAL, 1);
+        entries.add(_policyspecdn, MINTOKENLENGTH_ATTR_NAME, minTokenLengthDSEntry);
+        setComponentTable(_tfMinTokenLengthValue, minTokenLengthDSEntry);
 
         // create containers and layouts
-        JPanel panel =
-            new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
-		GridBagConstraints gbc = getGBC();
-		gbc.gridwidth = gbc.REMAINDER;
-		gbc.anchor = gbc.WEST;
-        gbc.fill = gbc.HORIZONTAL;
+        JPanel syntaxPanel = new GroupPanel(  _resource.getString(_section, "syntax-title"));
+        syntaxPanel.setLayout(new GridBagLayout());
+                GridBagConstraints gbc = getGBC();
+                gbc.gridwidth = gbc.REMAINDER;
+        gbc.anchor = GridBagConstraints.WEST;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
         gbc.weightx = 1.0;
-        myContainer.add(panel, gbc);
-        panel.add(_minLengthLabel);
-		int space = UIFactory.getComponentSpace();
-        panel.add(Box.createHorizontalStrut(space));
-        panel.add(_tfMinLengthValue);
+        myContainer.add(syntaxPanel, gbc);
+
+        GridBagUtil.constrain(syntaxPanel, _cbCheckSyntax, 0, 0,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, SuiConstants.COMPONENT_SPACE, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minLengthLabel, 0, 1,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinLengthValue, 1, 1, 
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minDigitsLabel, 0, 2,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinDigitsValue, 1, 2,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minAlphasLabel, 0, 3,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinAlphasValue, 1, 3,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minUppersLabel, 0, 4,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinUppersValue, 1, 4,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minLowersLabel, 0, 5,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinLowersValue, 1, 5,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minSpecialsLabel, 0, 6,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinSpecialsValue, 1, 6,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _min8bitLabel, 0, 7,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMin8bitValue, 1, 7,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _maxRepeatsLabel, 0, 8,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMaxRepeatsValue, 1, 8,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minCategoriesLabel, 0, 9,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinCategoriesValue, 1, 9,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
+
+        GridBagUtil.constrain(syntaxPanel, _minTokenLengthLabel, 0, 10,
+                              1, 1, 0.0, 0.0,
+                              GridBagConstraints.EAST, GridBagConstraints.NONE,
+                              0, 0, 0, SuiConstants.COMPONENT_SPACE);
+
+        GridBagUtil.constrain(syntaxPanel, _tfMinTokenLengthValue, 1, 10,
+                              1, 1, 1.0, 0.0,
+                              GridBagConstraints.WEST, GridBagConstraints.NONE,
+                              0, 0, SuiConstants.COMPONENT_SPACE, 0);
     }
 
+
     protected void createExpirationArea( Container myContainer) {
         ButtonGroup expirationButtonGroup = new ButtonGroup();
 
@@ -610,7 +795,7 @@
      * @param e event
      */
     public void actionPerformed(ActionEvent e) {
-	    if (e.getSource().equals(_cbCheckSyntax)) {
+        if (e.getSource().equals(_cbCheckSyntax)) {
 			enableSyntax();
         } else if (e.getSource().equals(_cbKeepHistory)) {
 			enableHistory();
@@ -709,6 +894,42 @@
 		_minLengthLabel.repaint();
 		_tfMinLengthValue.setEnabled( enable );
 		_tfMinLengthValue.repaint();
+                _minDigitsLabel.setEnabled( enable );
+                _minDigitsLabel.repaint();
+                _tfMinDigitsValue.setEnabled( enable );
+                _tfMinDigitsValue.repaint();
+                _minAlphasLabel.setEnabled( enable );
+                _minAlphasLabel.repaint();
+                _tfMinAlphasValue.setEnabled( enable );
+                _tfMinAlphasValue.repaint();
+                _minUppersLabel.setEnabled( enable );
+                _minUppersLabel.repaint();
+                _tfMinUppersValue.setEnabled( enable );
+                _tfMinUppersValue.repaint();
+                _minLowersLabel.setEnabled( enable );
+                _minLowersLabel.repaint();
+                _tfMinLowersValue.setEnabled( enable );
+                _tfMinLowersValue.repaint();
+                _minSpecialsLabel.setEnabled( enable );
+                _minSpecialsLabel.repaint();
+                _tfMinSpecialsValue.setEnabled( enable );
+                _tfMinSpecialsValue.repaint();
+                _min8bitLabel.setEnabled( enable );
+                _min8bitLabel.repaint();
+                _tfMin8bitValue.setEnabled( enable );
+                _tfMin8bitValue.repaint();
+                _maxRepeatsLabel.setEnabled( enable );
+                _maxRepeatsLabel.repaint();
+                _tfMaxRepeatsValue.setEnabled( enable );
+                _tfMaxRepeatsValue.repaint();
+                _minCategoriesLabel.setEnabled( enable );
+                _minCategoriesLabel.repaint();
+                _tfMinCategoriesValue.setEnabled( enable );
+                _tfMinCategoriesValue.repaint();
+                _minTokenLengthLabel.setEnabled( enable );
+                _minTokenLengthLabel.repaint();
+                _tfMinTokenLengthValue.setEnabled( enable );
+                _tfMinTokenLengthValue.repaint();
     }
 
 	private void enableChange (){
@@ -910,6 +1131,24 @@
 
     private JLabel          _minLengthLabel;
     private JTextField      _tfMinLengthValue;
+    private JLabel          _minDigitsLabel;
+    private JTextField      _tfMinDigitsValue;
+    private JLabel          _minAlphasLabel;
+    private JTextField      _tfMinAlphasValue;
+    private JLabel          _minUppersLabel;
+    private JTextField      _tfMinUppersValue;
+    private JLabel          _minLowersLabel;
+    private JTextField      _tfMinLowersValue;
+    private JLabel          _minSpecialsLabel;
+    private JTextField      _tfMinSpecialsValue;
+    private JLabel          _min8bitLabel;
+    private JTextField      _tfMin8bitValue;
+    private JLabel          _maxRepeatsLabel;
+    private JTextField      _tfMaxRepeatsValue;
+    private JLabel          _minCategoriesLabel;
+    private JTextField      _tfMinCategoriesValue;
+    private JLabel          _minTokenLengthLabel;
+    private JTextField      _tfMinTokenLengthValue;
 
     private JRadioButton    _rbNever;
     private JRadioButton    _rbExpiresIn;
@@ -995,10 +1234,64 @@
         "passwordCheckSyntax";
 
     private static final String MINLENGTH_DN = "cn=config";
-    private static final String MINLENGTH_ATTR_NAME =
-        "passwordMinLength";
+    private static final String MINLENGTH_ATTR_NAME = "passwordMinLength";
     private static final int MINLENGTH_MIN_VAL = 2;
     private static final int MINLENGTH_MAX_VAL = 512;
+    private static final String MINLENGTH_DEFAULT_VAL = "8";
+
+    private static final String MINDIGITS_DN = "cn=config";
+    private static final String MINDIGITS_ATTR_NAME = "passwordMinDigits";
+    private static final int MINDIGITS_MIN_VAL = 0;
+    private static final int MINDIGITS_MAX_VAL = 64;
+    private static final String MINDIGITS_DEFAULT_VAL = "0";
+
+    private static final String MINALPHAS_DN = "cn=config";
+    private static final String MINALPHAS_ATTR_NAME = "passwordMinAlphas";
+    private static final int MINALPHAS_MIN_VAL = 0;
+    private static final int MINALPHAS_MAX_VAL = 64;
+    private static final String MINALPHAS_DEFAULT_VAL = "0";
+
+    private static final String MINUPPERS_DN = "cn=config";
+    private static final String MINUPPERS_ATTR_NAME = "passwordMinUppers";
+    private static final int MINUPPERS_MIN_VAL = 0;
+    private static final int MINUPPERS_MAX_VAL = 64;
+    private static final String MINUPPERS_DEFAULT_VAL = "0";
+
+    private static final String MINLOWERS_DN = "cn=config";
+    private static final String MINLOWERS_ATTR_NAME = "passwordMinLowers";
+    private static final int MINLOWERS_MIN_VAL = 0;
+    private static final int MINLOWERS_MAX_VAL = 64;
+    private static final String MINLOWERS_DEFAULT_VAL = "0";
+
+    private static final String MINSPECIALS_DN = "cn=config";
+    private static final String MINSPECIALS_ATTR_NAME = "passwordMinSpecials";
+    private static final int MINSPECIALS_MIN_VAL = 0;
+    private static final int MINSPECIALS_MAX_VAL = 64;
+    private static final String MINSPECIALS_DEFAULT_VAL = "0";
+
+    private static final String MIN8BIT_DN = "cn=config";
+    private static final String MIN8BIT_ATTR_NAME = "passwordMin8bit";
+    private static final int MIN8BIT_MIN_VAL = 0;
+    private static final int MIN8BIT_MAX_VAL = 64;
+    private static final String MIN8BIT_DEFAULT_VAL = "0";
+
+    private static final String MAXREPEATS_DN = "cn=config";
+    private static final String MAXREPEATS_ATTR_NAME = "passwordMaxRepeats";
+    private static final int MAXREPEATS_MIN_VAL = 0;
+    private static final int MAXREPEATS_MAX_VAL = 64;
+    private static final String MAXREPEATS_DEFAULT_VAL = "0";
+
+    private static final String MINCATEGORIES_DN = "cn=config";
+    private static final String MINCATEGORIES_ATTR_NAME = "passwordMinCategories";
+    private static final int MINCATEGORIES_MIN_VAL = 1;
+    private static final int MINCATEGORIES_MAX_VAL = 5;
+    private static final String  MINCATEGORIES_DEFAULT_VAL = "3";
+
+    private static final String MINTOKENLENGTH_DN = "cn=config";
+    private static final String MINTOKENLENGTH_ATTR_NAME = "passwordMinTokenLength";
+    private static final int MINTOKENLENGTH_MIN_VAL = 1;
+    private static final int MINTOKENLENGTH_MAX_VAL = 64;
+    private static final String MINTOKENLENGTH_DEFAULT_VAL = "3";
 
     private static final String EXPIRES_DN = "cn=config";
     private static final String EXPIRES_ATTR_NAME = "passwordExp";




More information about the Fedora-directory-commits mailing list