@@ -123,7 +123,7 @@ protected boolean isSubjectExists(String subjectId) throws DBCException {
123123 // Users
124124
125125 /**
126- * Creates user. Saves user id in database in lower-case .
126+ * Creates user. Saves user id in database as provided .
127127 */
128128 @ Override
129129 public void createUser (
@@ -132,7 +132,6 @@ public void createUser(
132132 boolean enabled ,
133133 @ Nullable String defaultAuthRole
134134 ) throws DBException {
135- userId = userId .toLowerCase (); // creating new users only with lowercase
136135 validateAndCreateUser (userId , metaParameters , enabled , defaultAuthRole );
137136 }
138137
@@ -211,15 +210,13 @@ protected void importUsers(@NotNull Connection connection, @NotNull SMUserImport
211210 if (CommonUtils .isNotEmpty (metaParameters .get (SMStandardMeta .META_USER_ID ))) {
212211 userId = metaParameters .get (SMStandardMeta .META_USER_ID );
213212 }
214- for (String possibleUserId : List .of (userId , userId .toLowerCase ())) {
215- if (isSubjectExists (possibleUserId )) {
216- log .info ("User already exist : " + possibleUserId );
217- setUserAuthRole (connection , possibleUserId , authRole );
218- enableUser (connection , possibleUserId , true , null , null );
219- continue outer ;
220- }
213+ if (isSubjectExists (userId )) {
214+ log .info ("User already exist : " + userId );
215+ setUserAuthRole (connection , userId , authRole );
216+ enableUser (connection , userId , true , null , null );
217+ continue ;
221218 }
222- insertUser (connection , userId . toLowerCase () , metaParameters , true , authRole );
219+ insertUser (connection , userId , metaParameters , true , authRole );
223220 }
224221 }
225222
@@ -1291,7 +1288,6 @@ public SMTeam createTeam(
12911288 if (CommonUtils .isEmpty (teamId )) {
12921289 throw new DBCException ("Empty team name is not allowed" );
12931290 }
1294- teamId = teamId .toLowerCase ();
12951291 if (isSubjectExists (teamId )) {
12961292 throw new DBCException ("User or team '" + teamId + "' already exists" );
12971293 }
0 commit comments