Password Rule
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2008 02:46 AM
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2008 03:47 AM
Currently you can only set the password length if you are using Alfresco for authentication. Default password length has to be between 3 and 32. You can only change the min length. You can change it in /tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.xml.
Look for the following line:
You can of course change this easily. If you set up the Alfresco SDK http://wiki.alfresco.com/wiki/Alfresco_SDK there is a example of writing your own Custom Login page (http://wiki.alfresco.com/wiki/Customising_The_Login_Page). Follow the example and override org.alfresco.web.bean.LoginBean's validatePassword method.
Look for the following line:
<password-min-length>3</password-min-length>
You can of course change this easily. If you set up the Alfresco SDK http://wiki.alfresco.com/wiki/Alfresco_SDK there is a example of writing your own Custom Login page (http://wiki.alfresco.com/wiki/Customising_The_Login_Page). Follow the example and override org.alfresco.web.bean.LoginBean's validatePassword method.
public void validatePassword(FacesContext context, UIComponent component, Object value) throws ValidatorException { int minPasswordLength = Application.getClientConfig(context).getMinPasswordLength(); String pass = (String) value; if (pass.length() < minPasswordLength || pass.length() > 32) { String err = MessageFormat.format(Application.getMessage(context, MSG_PASSWORD_LENGTH), new Object[]{minPasswordLength, 32}); throw new ValidatorException(new FacesMessage(err)); } }
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2008 04:31 AM
Thank You,
I try to search the code in web-client-config.xml but there is not in file.
I try to insert this code like last line but it is ignored from Alfresco.
What can I do?
Thanks
I try to search the code in web-client-config.xml but there is not in file.
I try to insert this code like last line but it is ignored from Alfresco.
What can I do?
Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2008 05:14 AM
What version of Alfresco are you using?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2008 05:17 AM
Alfresco 2.1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2008 10:29 AM
Thanks…
Although this is not the safest way to do it, this info just temporarely solved a problem I had with password definition.
I defined a behaviour that generated the password randomly, so asking for a password on user creation was useless
Now all that I'm missing is a way to remove the textboxes from the dialog, and then work on a v2 of my project
Although this is not the safest way to do it, this info just temporarely solved a problem I had with password definition.
I defined a behaviour that generated the password randomly, so asking for a password on user creation was useless
Now all that I'm missing is a way to remove the textboxes from the dialog, and then work on a v2 of my project