mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix uppercase usernames imported from 3.
Uppercase usernames will break logic on three. They need to be lowered before they are imported.
This commit is contained in:
parent
50438c485b
commit
0f43dd627a
@ -39,7 +39,9 @@ class Import3:
|
||||
if isinstance(json_data, list):
|
||||
for user in json_data:
|
||||
if str(user["username"]).lower() != "admin":
|
||||
HelperUsers.add_rawpass_user(user["username"], user["password"])
|
||||
HelperUsers.add_rawpass_user(
|
||||
str(user["username"]).lower(), user["password"]
|
||||
)
|
||||
Console.info(f"Imported user {user['username']} from Crafty 3")
|
||||
logger.info(f"Imported user {user['username']} from Crafty 3")
|
||||
else:
|
||||
@ -47,7 +49,7 @@ class Import3:
|
||||
else:
|
||||
if str(json_data["username"]).lower() != "admin":
|
||||
HelperUsers.add_rawpass_user(
|
||||
json_data["username"], json_data["password"]
|
||||
str(json_data["username"]).lower(), json_data["password"]
|
||||
)
|
||||
Console.info(f"Imported user {json_data['username']} from Crafty 3")
|
||||
logger.info(f"Imported user {json_data['username']} from Crafty 3")
|
||||
|
Loading…
Reference in New Issue
Block a user