File tree Expand file tree Collapse file tree
core/src/main/java/io/aiven/klaw/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- version = 2.8.0
1+ version = 2.8.1
22NODE = node
33
44# Sets a custom hook path in the local git config.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ SET CURRENTDIR="%cd%"
44set DIR = %~dp0 ..\
55cd %DIR%
66
7- set version = 2.8.0
7+ set version = 2.8.1
88set core_lib = .\core\target\klaw-%version% .jar
99set cluster_lib = .\cluster-api\target\cluster-api-%version% .jar
1010set core_config = .\core\target\classes\application.properties
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ WORKING_DIR="$(dirname "$0")"/..
44cd $WORKING_DIR
55
66# Declarations
7- version=2.8.0
7+ version=2.8.1
88core_lib=./core/target/klaw-${version} .jar
99cluster_lib=./cluster-api/target/cluster-api-${version} .jar
1010core_config=./core/target/classes/application.properties
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ public class UsersTeamsControllerService {
7272 public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper ();
7373 public static final String MASKED_PWD = "********" ;
7474 public static final String UNUSED_PASSWD = "unusedpasswd" ;
75+ private static final Pattern emailUsernamePattern = Pattern .compile ("^[A-Za-z0-9+_.-]+@(.+)$" );
7576
7677 @ Value ("${klaw.login.authentication.type}" )
7778 private String authenticationType ;
@@ -1096,8 +1097,9 @@ private Object getPrincipal() {
10961097 }
10971098
10981099 private boolean userNamePatternValidation (String userName ) {
1099- Matcher m1 = defaultPattern .matcher (userName );
1100- return m1 .matches ();
1100+ Matcher m1 = emailUsernamePattern .matcher (userName );
1101+ Matcher m2 = defaultPattern .matcher (userName );
1102+ return m1 .matches () || m2 .matches ();
11011103 }
11021104
11031105 public List <TeamModelResponse > getSwitchTeams (String userId ) {
Original file line number Diff line number Diff line change 1010 " name" : "Apache 2.0",
1111 " url" : "https://www.apache.org/licenses/LICENSE-2.0.html"
1212 },
13- " version" : "2.8.0 "
13+ " version" : "2.8.1 "
1414 },
1515 " externalDocs" : {
1616 " description" : "Klaw documentation",
Original file line number Diff line number Diff line change 4242 </parent >
4343
4444 <properties >
45- <revision >2.8.0 </revision >
45+ <revision >2.8.1 </revision >
4646 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
4747 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
4848 <java .version>17</java .version>
You can’t perform that action at this time.
0 commit comments