mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Frontend indicate require admin (#22272)
* Allow panels to indicate they are meant for admins * Panels to indicate when they require admin access * Do not return admin-only panels to non-admin users * Fix flake8
This commit is contained in:
@@ -130,6 +130,7 @@ async def test_module_webcomponent(hass):
|
||||
},
|
||||
'embed_iframe': True,
|
||||
'trust_external_script': True,
|
||||
'require_admin': True,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +146,7 @@ async def test_module_webcomponent(hass):
|
||||
|
||||
panel = panels['nice_url']
|
||||
|
||||
assert panel.require_admin
|
||||
assert panel.config == {
|
||||
'hello': 'world',
|
||||
'_panel_custom': {
|
||||
|
||||
Reference in New Issue
Block a user