Skip to content

Commit

Permalink
catalog: enable mail as a valid user id, #TASK-6183
Browse files Browse the repository at this point in the history
  • Loading branch information
pfurio committed May 7, 2024
1 parent f8b7020 commit cc9f2ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static void checkValidUserId(String userId) throws CatalogParameterExcept
if (userId.equals(ParamConstants.ANONYMOUS_USER_ID) || userId.equals(ParamConstants.REGISTERED_USERS)) {
throw new CatalogParameterException("User id cannot be one of the reserved OpenCGA users.");
}
if (!userId.matches("^[A-Za-z0-9]([-_.]?[A-Za-z0-9])*$")) {
if (!userId.matches("^[A-Za-z0-9]([-_.@]?[A-Za-z0-9])*$")) {
throw new CatalogParameterException("Invalid user id. Id needs to start by any character and might contain single '-', '_', "
+ "'.', symbols followed by any character or number.");
}
Expand Down

0 comments on commit cc9f2ca

Please sign in to comment.