debugging for the user generation from the csv import
This commit is contained in:
+5
-2
@@ -8529,7 +8529,7 @@ def parse_csv_users(file_bytes):
|
||||
|
||||
return parsed_users
|
||||
|
||||
def generate_compliant_password(length=16):
|
||||
def generate_compliant_password(length=6):
|
||||
lowers = string.ascii_lowercase
|
||||
uppers = string.ascii_uppercase
|
||||
digits = string.digits
|
||||
@@ -8664,12 +8664,15 @@ def register_csv():
|
||||
|
||||
# Benutzernamen & Passwort generieren
|
||||
username = us.build_unique_username_from_name(name, last_name)
|
||||
password = generate_compliant_password(5)
|
||||
password = generate_compliant_password(6)
|
||||
|
||||
password = us.check_password_strength(password) and password or generate_compliant_password(6)
|
||||
|
||||
action_permissions = None
|
||||
page_permissions = None
|
||||
|
||||
try:
|
||||
app.logger.info(f"Creating user: {username} ({name} {last_name}) with preset: {permission_preset} and password: {password}")
|
||||
us.add_user(
|
||||
username,
|
||||
password,
|
||||
|
||||
Reference in New Issue
Block a user