Allows usernames with uppercase
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Mar 2011 00:34:24 +0000 (00:34 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Mar 2011 00:34:24 +0000 (00:34 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4357 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/UserAdminService.java
server/runtime/org.argeo.server.jcr/src/main/resources/org/argeo/jcr/argeo.cnd

index dddec035701d60afc61874ce6a3f1ac4185cbcc4..964c9dff2d7332a0630f943daef4ca07a78cf9e7 100644 (file)
@@ -4,14 +4,14 @@ import java.util.Set;
 
 import org.springframework.security.userdetails.UserDetailsManager;
 
-public interface UserAdminService extends UserDetailsManager{
+public interface UserAdminService extends UserDetailsManager {
        /**
         * Usernames must match this regexp pattern ({@value #USERNAME_PATTERN}).
         * Thanks to <a href=
         * "http://www.mkyong.com/regular-expressions/how-to-validate-username-with-regular-expression/"
-        * >this tip</a> (modified to remove '-')
+        * >this tip</a> (modified to remove '-' and add upper-case)
         */
-       public final static String USERNAME_PATTERN = "^[a-z0-9_]{3,15}$";
+       public final static String USERNAME_PATTERN = "^[a-zA-Z0-9_]{3,15}$";
 
        /**
         * Email addresses must match this regexp pattern ({@value #EMAIL_PATTERN}.
index a2d790a949bd26640325e54264373836e7b0330c..19fba377549ce3490e07ed7e8f7963e2fafb2d62 100644 (file)
@@ -10,9 +10,9 @@ mixin
 // user should be lower case, between 3 and 15 characters long
 [argeo:userHome] > mix:created, mix:lastModified
 mixin
-- argeo:userID (STRING) m < '^[a-z0-9_]{3,15}$'
+- argeo:userID (STRING) m
 + argeo:profile (argeo:userProfile)
 
 [argeo:userProfile] > mix:created, mix:lastModified, mix:title, mix:versionable
 mixin
-- argeo:userID (STRING) m < '^[a-z0-9_]{3,15}$'
+- argeo:userID (STRING) m