1
0
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:
Paulus Schoutsen
2019-03-25 10:04:35 -07:00
committed by GitHub
parent b57d809dad
commit f1a0ad9e4a
9 changed files with 90 additions and 14 deletions

View File

@@ -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': {