mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Only allow admins to enable remote connection (#22609)
* Only allow admins to enable remote connection * Protect WS API * Lint
This commit is contained in:
committed by
Pascal Vizeli
parent
282fd225c9
commit
c96804954c
@@ -422,6 +422,7 @@ def _account_data(cloud):
|
||||
}
|
||||
|
||||
|
||||
@websocket_api.require_admin
|
||||
@_require_cloud_login
|
||||
@websocket_api.async_response
|
||||
@_ws_handle_cloud_errors
|
||||
@@ -436,6 +437,7 @@ async def websocket_remote_connect(hass, connection, msg):
|
||||
connection.send_result(msg['id'], _account_data(cloud))
|
||||
|
||||
|
||||
@websocket_api.require_admin
|
||||
@_require_cloud_login
|
||||
@websocket_api.async_response
|
||||
@_ws_handle_cloud_errors
|
||||
|
||||
Reference in New Issue
Block a user