simpleSearchAdditionalAttributes = null;
private int minUsernameLength = 2;
private int minPasswordLength = 3;
+ private int maxPasswordLength = 255;
private int minGroupNameLength = 3;
private String breadcrumbMode = BREADCRUMB_PATH;
private String cifsURLSuffix = null;
@@ -280,6 +281,11 @@ public class ClientConfigElement extends ConfigElementAdapter
combinedElement.setMinPasswordLength(newElement.getMinPasswordLength());
}
+ if (newElement.getMaxPasswordLength() != combinedElement.getMaxPasswordLength())
+ {
+ combinedElement.setMaxPasswordLength(newElement.getMaxPasswordLength());
+ }
+
if (newElement.getMinGroupNameLength() != combinedElement.getMinGroupNameLength())
{
combinedElement.setMinGroupNameLength(newElement.getMinGroupNameLength());
@@ -769,6 +775,22 @@ public class ClientConfigElement extends ConfigElementAdapter
this.minPasswordLength = minPasswordLength;
}
+ /**
+ * @return Returns the maximum length for a password.
+ */
+ public int getMaxPasswordLength()
+ {
+ return this.maxPasswordLength;
+ }
+
+ /**
+ * @param maxPasswordLength The maximum length of a password
+ */
+ public void setMaxPasswordLength(int maxPasswordLength)
+ {
+ this.maxPasswordLength = maxPasswordLength;
+ }
+
/**
* @return Returns the minimum length for a group name.
*/
diff --git a/source/java/org/alfresco/web/config/ClientElementReader.java b/source/java/org/alfresco/web/config/ClientElementReader.java
index a1962dfc93..36743b668c 100644
--- a/source/java/org/alfresco/web/config/ClientElementReader.java
+++ b/source/java/org/alfresco/web/config/ClientElementReader.java
@@ -59,6 +59,7 @@ public class ClientElementReader implements ConfigElementReader
public static final String ELEMENT_SIMPLESEARCHADDITIONALATTRSQNAME = "qname";
public static final String ELEMENT_MINUSERNAMELENGTH = "username-min-length";
public static final String ELEMENT_MINPASSWORDLENGTH = "password-min-length";
+ public static final String ELEMENT_MAXPASSWORDLENGTH = "password-max-length";
public static final String ELEMENT_MINGROUPNAMELENGTH = "group-name-min-length";
public static final String ELEMENT_BREADCRUMB_MODE = "breadcrumb-mode";
public static final String ELEMENT_CIFSURLSUFFIX = "cifs-url-suffix";
@@ -268,6 +269,13 @@ public class ClientElementReader implements ConfigElementReader
configElement.setMinPasswordLength(Integer.parseInt(minPassword.getTextTrim()));
}
+ // get the maximum length of passwords
+ Element maxPassword = element.element(ELEMENT_MAXPASSWORDLENGTH);
+ if (maxPassword != null)
+ {
+ configElement.setMaxPasswordLength(Integer.parseInt(maxPassword.getTextTrim()));
+ }
+
// get the minimum length of group names
Element minGroupName = element.element(ELEMENT_MINGROUPNAMELENGTH);
if (minGroupName != null)
diff --git a/source/web/jsp/users/change-my-password.jsp b/source/web/jsp/users/change-my-password.jsp
index 33bffad8f3..4a0f2b41f6 100644
--- a/source/web/jsp/users/change-my-password.jsp
+++ b/source/web/jsp/users/change-my-password.jsp
@@ -79,15 +79,17 @@
: |
*
|
: |
*
+ size="35" validator="#{LoginBean.validateMatch}"
+ onkeyup="updateButtonState();" onchange="updateButtonState();">
+
+ *
|
diff --git a/source/web/jsp/users/change-password.jsp b/source/web/jsp/users/change-password.jsp
index f6f84d806e..299a1b5234 100644
--- a/source/web/jsp/users/change-password.jsp
+++ b/source/web/jsp/users/change-password.jsp
@@ -63,7 +63,7 @@
*
|
@@ -72,8 +72,10 @@
*
+ size="35" validator="#{LoginBean.validateMatch}"
+ onkeyup="updateButtonState();" onchange="updateButtonState();" >
+
+ *
|
diff --git a/source/web/jsp/users/new-user-wizard/new-user-properties.jsp b/source/web/jsp/users/new-user-wizard/new-user-properties.jsp
index e472593c7a..4718714f75 100644
--- a/source/web/jsp/users/new-user-wizard/new-user-properties.jsp
+++ b/source/web/jsp/users/new-user-wizard/new-user-properties.jsp
@@ -98,17 +98,19 @@ function validate()
-
+
-
+
-
+
+
+