Do not allow user to create anti-lockout-user

This commit is contained in:
Andrew 2024-01-31 22:01:04 -05:00
parent 68b0e611be
commit aec14a6713

View File

@ -252,6 +252,8 @@ class UsersController:
superuser: bool = False, superuser: bool = False,
theme="default", theme="default",
): ):
if username == "anti-lockout-user":
raise ValueError("Username is not valid")
return self.users_helper.add_user( return self.users_helper.add_user(
username, username,
manager, manager,
@ -373,7 +375,7 @@ class UsersController:
email="", email="",
enabled=True, enabled=True,
superuser=True, superuser=True,
theme="ronald", theme="anti-lockout",
) )
Console.yellow( Console.yellow(