mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add is_admin check to check configuration API (#97788)
This commit is contained in:
@@ -744,10 +744,10 @@ def hass_client(
|
||||
) -> ClientSessionGenerator:
|
||||
"""Return an authenticated HTTP client."""
|
||||
|
||||
async def auth_client() -> TestClient:
|
||||
async def auth_client(access_token: str | None = hass_access_token) -> TestClient:
|
||||
"""Return an authenticated client."""
|
||||
return await aiohttp_client(
|
||||
hass.http.app, headers={"Authorization": f"Bearer {hass_access_token}"}
|
||||
hass.http.app, headers={"Authorization": f"Bearer {access_token}"}
|
||||
)
|
||||
|
||||
return auth_client
|
||||
|
||||
Reference in New Issue
Block a user