svn commit: r568662 - in /lenya/trunk/src: modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java webapp/readme.xml

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: rfrovarp
Date: Wed Aug 22 08:48:18 2007
New Revision: 568662

URL: http://svn.apache.org/viewvc?rev=568662&view=rev
Log:
Make user names case insensitive. Fixes bug 41848.

Modified:
    lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java
    lenya/trunk/src/modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java
    lenya/trunk/src/webapp/readme.xml

Modified: lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java?rev=568662&r1=568661&r2=568662&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java (original)
+++ lenya/trunk/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/UserAuthenticator.java Wed Aug 22 08:48:18 2007
@@ -59,7 +59,7 @@
         }
 
         if (encoded.length() == 0 && request.getParameter("username") != null) {
-                username = request.getParameter("username");
+                username = request.getParameter("username").toLowerCase();
                 password = request.getParameter("password");
         }
 

Modified: lenya/trunk/src/modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java?rev=568662&r1=568661&r2=568662&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java (original)
+++ lenya/trunk/src/modules-core/administration/java/src/org/apache/lenya/cms/ac/usecases/AddUser.java Wed Aug 22 08:48:18 2007
@@ -43,7 +43,7 @@
      */
     void validate() throws UsecaseException {
 
-        String userId = getParameterAsString(UserProfile.USER_ID);
+        String userId = getParameterAsString(UserProfile.USER_ID).toLowerCase();
         String email = getParameterAsString(UserProfile.EMAIL);
         String className = getParameterAsString(CLASS_NAME);
         String ldapId = getParameterAsString(LDAP_ID);
@@ -102,7 +102,7 @@
     protected void doExecute() throws Exception {
         UserManager userManager = (FileUserManager) getUserManager();
 
-        String userId = getParameterAsString(UserProfile.USER_ID);
+        String userId = getParameterAsString(UserProfile.USER_ID).toLowerCase();
         String fullName = getParameterAsString(UserProfile.FULL_NAME);
         String description = getParameterAsString(UserProfile.DESCRIPTION);
         String email = getParameterAsString(UserProfile.EMAIL);

Modified: lenya/trunk/src/webapp/readme.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/readme.xml?rev=568662&r1=568661&r2=568662&view=diff
==============================================================================
--- lenya/trunk/src/webapp/readme.xml (original)
+++ lenya/trunk/src/webapp/readme.xml Wed Aug 22 08:48:18 2007
@@ -36,6 +36,17 @@
     
     <h2>Important notes for beta testers of Lenya 2.0</h2>
 
+    <h3>2007-08-22: User names are now case insensitive</h3>
+    <p>
+      User names are now case insensitive to better support Windows, user assumptions, auto form 
+      completion, and support. This is done by converting all user names to lower case. Any
+      previously created accounts with upper case characters will no longer work. To fix
+      delete and recreate the account using the built in tools. Or optionally, rename any
+      *.iml files in your publication's <code>config/access-control/passwd</code> directory
+      so that the file names are all lower case. You will also have to edit the <code>id</code> 
+      attribute of the <code>identity</code> element to make it lower case in those files as well.
+    </p>
+
     <h3>2007-08-13: Workflow schema validation fixed</h3>
     <p>
       The old XSD-based schema validation in <code>workflow.xml</code> was
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.