Change WHITELIST to ALLOWLIST for websockets (#44766)

pull/44812/head
Kendell R 2021-01-04 03:40:03 -08:00 committed by GitHub
parent 0cff069c98
commit 5b67030c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -58,11 +58,11 @@ def handle_subscribe_events(hass, connection, msg):
"""Handle subscribe events command."""
# Circular dep
# pylint: disable=import-outside-toplevel
from .permissions import SUBSCRIBE_WHITELIST
from .permissions import SUBSCRIBE_ALLOWLIST
event_type = msg["event_type"]
if event_type not in SUBSCRIBE_WHITELIST and not connection.user.is_admin:
if event_type not in SUBSCRIBE_ALLOWLIST and not connection.user.is_admin:
raise Unauthorized
if event_type == EVENT_STATE_CHANGED:

View File

@ -22,7 +22,7 @@ from homeassistant.helpers.entity_registry import EVENT_ENTITY_REGISTRY_UPDATED
# These are events that do not contain any sensitive data
# Except for state_changed, which is handled accordingly.
SUBSCRIBE_WHITELIST = {
SUBSCRIBE_ALLOWLIST = {
EVENT_AREA_REGISTRY_UPDATED,
EVENT_COMPONENT_LOADED,
EVENT_CORE_CONFIG_UPDATE,