mirror of https://github.com/zulip/zulip.git
dev_ldap_directory: Use f-strings for better readability.
This commit is contained in:
parent
1a927c50b0
commit
3f06596cf0
|
@ -39,20 +39,20 @@ def generate_dev_ldap_dir(mode: str, num_users: int = 8) -> Dict[str, Dict[str,
|
|||
"birthDate": [user_data[3]],
|
||||
}
|
||||
if mode == "a":
|
||||
ldap_dir["uid=" + email + ",ou=users,dc=zulip,dc=com"] = dict(
|
||||
ldap_dir[f"uid={email},ou=users,dc=zulip,dc=com"] = dict(
|
||||
uid=[email],
|
||||
thumbnailPhoto=[profile_images[i % len(profile_images)]],
|
||||
userAccountControl=[LDAP_USER_ACCOUNT_CONTROL_NORMAL],
|
||||
**common_data,
|
||||
)
|
||||
elif mode == "b":
|
||||
ldap_dir["uid=" + email_username + ",ou=users,dc=zulip,dc=com"] = dict(
|
||||
ldap_dir[f"uid={email_username},ou=users,dc=zulip,dc=com"] = dict(
|
||||
uid=[email_username],
|
||||
jpegPhoto=[profile_images[i % len(profile_images)]],
|
||||
**common_data,
|
||||
)
|
||||
elif mode == "c":
|
||||
ldap_dir["uid=" + email_username + ",ou=users,dc=zulip,dc=com"] = dict(
|
||||
ldap_dir[f"uid={email_username},ou=users,dc=zulip,dc=com"] = dict(
|
||||
uid=[email_username], email=[email], **common_data
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue