mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Prevent stack for general user on boot
This commit is contained in:
parent
90ed32738f
commit
fb41bc2443
@ -210,6 +210,8 @@ class PanelHandler(BaseHandler):
|
|||||||
error = self.get_argument("error", "WTF Error!")
|
error = self.get_argument("error", "WTF Error!")
|
||||||
|
|
||||||
template = "panel/denied.html"
|
template = "panel/denied.html"
|
||||||
|
if self.helper.crafty_starting:
|
||||||
|
page = "loading"
|
||||||
|
|
||||||
now = time.time()
|
now = time.time()
|
||||||
formatted_time = str(
|
formatted_time = str(
|
||||||
@ -243,9 +245,13 @@ class PanelHandler(BaseHandler):
|
|||||||
for r in exec_user["roles"]:
|
for r in exec_user["roles"]:
|
||||||
role = self.controller.roles.get_role(r)
|
role = self.controller.roles.get_role(r)
|
||||||
exec_user_role.add(role["role_name"])
|
exec_user_role.add(role["role_name"])
|
||||||
defined_servers = self.controller.servers.get_authorized_servers(
|
# get_auth_servers will throw an exception if run while Crafty is starting
|
||||||
exec_user["user_id"]
|
if not self.helper.crafty_starting:
|
||||||
)
|
defined_servers = self.controller.servers.get_authorized_servers(
|
||||||
|
exec_user["user_id"]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
defined_servers = []
|
||||||
|
|
||||||
user_order = self.controller.users.get_user_by_id(exec_user["user_id"])
|
user_order = self.controller.users.get_user_by_id(exec_user["user_id"])
|
||||||
user_order = user_order["server_order"].split(",")
|
user_order = user_order["server_order"].split(",")
|
||||||
|
Loading…
Reference in New Issue
Block a user