mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
CI: cmdeploy fmt
This commit is contained in:
@@ -24,9 +24,7 @@ def encrypt_password(password: str):
|
|||||||
def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
||||||
"""Return True if user and password are admissable."""
|
"""Return True if user and password are admissable."""
|
||||||
if os.path.exists(NOCREATE_FILE):
|
if os.path.exists(NOCREATE_FILE):
|
||||||
logging.warning(
|
logging.warning(f"blocked account creation because {NOCREATE_FILE!r} exists.")
|
||||||
f"blocked account creation because {NOCREATE_FILE!r} exists."
|
|
||||||
)
|
|
||||||
return False
|
return False
|
||||||
password_length = len(cleartext_password)
|
password_length = len(cleartext_password)
|
||||||
if config.invite_token:
|
if config.invite_token:
|
||||||
@@ -36,7 +34,7 @@ def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
logging.warning(
|
logging.warning(
|
||||||
f"blocked account creation because password didn't contain invite token(s)."
|
"blocked account creation because password didn't contain invite token(s)."
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user