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 authored and GitHub committed 2019-03-25 10:04:35 -07:00
1 parent b57d809dad
commit f1a0ad9e4a
9 files changed
+90 -14

No files matched your search

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