My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2830: Support for @-sign in username (would enable use of email address as username)
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by da...@sharespine.com, Aug 13, 2014
We are redesigning our development pipeline and will now introduce Gerrit in the organization. We have a single sign on system based on email adresses as usernames. Thus we would need to use email adresses as username in Gerrit as well. 

We have identified two places where username with @-sign is rejected or automatically truncated, thus render the use of email adresses as username impossible. 

PLACE #1 

1. Register a user with email as username
2. System validates @-sign as incorrect use of character, thus rejects the username
3. Done

AND

PLACE #2 

1. Assign a user (which have never been logged in before) to a group
2. Gerrit writes username to DB table account_external_ids and truncates username on @-sign
3. The value written to database is "username:david" instead of desired "username:david@foo.bar"
4. Done

Patch to allow @-sign when register new account available below. That solves PLACE #1 at least. There might be more places we don't know about yet. 


--- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java
+++ b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/Account.java
@@ -60,7 +60,7 @@ public final class Account {
   }
 
   public static final String USER_NAME_PATTERN_FIRST = "[a-zA-Z0-9]";
-  public static final String USER_NAME_PATTERN_REST = "[a-zA-Z0-9._-]";
+  public static final String USER_NAME_PATTERN_REST = "[a-zA-Z0-9._@-]";
   public static final String USER_NAME_PATTERN_LAST = "[a-zA-Z0-9]";
 
   /** Regular expression that {@link #userName} must match. */

Thanks in advance for feedback on this feature request.
 
Sign in to add a comment

Powered by Google Project Hosting