Remove unneeded permissions check from subscribe entities (#68044)

This commit is contained in:
J. Nick Koston 2022-03-12 11:30:27 -10:00 committed by GitHub
parent 03a155af83
commit ea6da674df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,13 +278,6 @@ def handle_subscribe_entities(
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
) -> None:
"""Handle subscribe entities command."""
# Circular dep
# pylint: disable=import-outside-toplevel
from .permissions import SUBSCRIBE_ALLOWLIST
if "state_changed" not in SUBSCRIBE_ALLOWLIST and not connection.user.is_admin:
raise Unauthorized
entity_ids = set(msg.get("entity_ids", []))
@callback