From aec14a6713ee493aeea896edc27f3b1cdf7d8234 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 31 Jan 2024 22:01:04 -0500 Subject: [PATCH] Do not allow user to create anti-lockout-user --- app/classes/controllers/users_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/classes/controllers/users_controller.py b/app/classes/controllers/users_controller.py index c478f887..4a7fcc0f 100644 --- a/app/classes/controllers/users_controller.py +++ b/app/classes/controllers/users_controller.py @@ -252,6 +252,8 @@ class UsersController: superuser: bool = False, theme="default", ): + if username == "anti-lockout-user": + raise ValueError("Username is not valid") return self.users_helper.add_user( username, manager, @@ -373,7 +375,7 @@ class UsersController: email="", enabled=True, superuser=True, - theme="ronald", + theme="anti-lockout", ) Console.yellow(