mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-10-31 22:49:29 +00:00
Enable Security API (#710)
* Enable Security API * Update addons.py * Update proxy.py * Update __init__.py * Update security.py * Fix lint
This commit is contained in:
@@ -25,10 +25,6 @@ class APIProxy(CoreSysAttributes):
|
||||
hassio_token = request.headers.get(HEADER_HA_ACCESS)
|
||||
addon = self.sys_addons.from_token(hassio_token)
|
||||
|
||||
# REMOVE 132
|
||||
if not addon:
|
||||
addon = self.sys_addons.from_uuid(hassio_token)
|
||||
|
||||
if not addon:
|
||||
_LOGGER.warning("Unknown Home Assistant API access!")
|
||||
elif not addon.access_homeassistant_api:
|
||||
@@ -184,10 +180,6 @@ class APIProxy(CoreSysAttributes):
|
||||
response.get('access_token'))
|
||||
addon = self.sys_addons.from_token(hassio_token)
|
||||
|
||||
# REMOVE 132
|
||||
if not addon:
|
||||
addon = self.sys_addons.from_uuid(hassio_token)
|
||||
|
||||
if not addon or not addon.access_homeassistant_api:
|
||||
_LOGGER.warning("Unauthorized WebSocket access!")
|
||||
await server.send_json({
|
||||
|
||||
Reference in New Issue
Block a user