mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Return if user is local only (#60917)
This commit is contained in:
parent
b883014ed4
commit
ef458b237c
@ -150,6 +150,7 @@ def _user_info(user):
|
||||
"name": user.name,
|
||||
"is_owner": user.is_owner,
|
||||
"is_active": user.is_active,
|
||||
"local_only": user.local_only,
|
||||
"system_generated": user.system_generated,
|
||||
"group_ids": [group.id for group in user.groups],
|
||||
"credentials": [{"type": c.auth_provider_type} for c in user.credentials],
|
||||
|
@ -66,6 +66,7 @@ async def test_list(hass, hass_ws_client, hass_admin_user):
|
||||
"name": "Mock User",
|
||||
"is_owner": False,
|
||||
"is_active": True,
|
||||
"local_only": False,
|
||||
"system_generated": False,
|
||||
"group_ids": [group.id for group in hass_admin_user.groups],
|
||||
"credentials": [{"type": "homeassistant"}],
|
||||
@ -76,6 +77,7 @@ async def test_list(hass, hass_ws_client, hass_admin_user):
|
||||
"name": "Test Owner",
|
||||
"is_owner": True,
|
||||
"is_active": True,
|
||||
"local_only": False,
|
||||
"system_generated": False,
|
||||
"group_ids": [group.id for group in owner.groups],
|
||||
"credentials": [{"type": "homeassistant"}],
|
||||
@ -86,6 +88,7 @@ async def test_list(hass, hass_ws_client, hass_admin_user):
|
||||
"name": "Test Hass.io",
|
||||
"is_owner": False,
|
||||
"is_active": True,
|
||||
"local_only": False,
|
||||
"system_generated": True,
|
||||
"group_ids": [],
|
||||
"credentials": [],
|
||||
@ -96,6 +99,7 @@ async def test_list(hass, hass_ws_client, hass_admin_user):
|
||||
"name": "Inactive User",
|
||||
"is_owner": False,
|
||||
"is_active": False,
|
||||
"local_only": False,
|
||||
"system_generated": False,
|
||||
"group_ids": [group.id for group in inactive.groups],
|
||||
"credentials": [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user