mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Do not allow user to create anti-lockout-user
This commit is contained in:
parent
68b0e611be
commit
aec14a6713
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user