mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Only show server inits to admins
This commit is contained in:
parent
61c1621cbb
commit
4152e2be69
@ -173,7 +173,7 @@ class ServersController(metaclass=Singleton):
|
||||
self.failed_servers = []
|
||||
|
||||
for server in servers:
|
||||
self.ws.broadcast(
|
||||
self.ws.broadcast_to_admins(
|
||||
"update", {"message": f"Initializing {server['server_name']}."}
|
||||
)
|
||||
server_id = server.get("server_id")
|
||||
|
@ -37,7 +37,7 @@ class WebSocketManager(metaclass=Singleton):
|
||||
|
||||
def broadcast_to_admins(self, event_type: str, data):
|
||||
def filter_fn(client):
|
||||
if client.get_user_id in HelperUsers.get_super_user_list():
|
||||
if str(client.get_user_id()) in str(HelperUsers.get_super_user_list()):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user