Add permissions foundation (#16890)
* Add permission foundation * Address comments * typing * False > True * Convert more lambdas * Use constants * Remove support for False * Fix only allow True
This commit is contained in:
1 parent
5961f2f577
commit
61f7a39748
7 files changed
+532
-9
No files matched your search
+4
-2
@@ -348,10 +348,12 @@ def mock_device_registry(hass, mock_entries=None):
|
||||
class MockGroup(auth_models.Group):
|
||||
"""Mock a group in Home Assistant."""
|
||||
|
||||
def __init__(self, id=None, name='Mock Group'):
|
||||
def __init__(self, id=None, name='Mock Group',
|
||||
policy=auth_store.DEFAULT_POLICY):
|
||||
"""Mock a group."""
|
||||
kwargs = {
|
||||
'name': name
|
||||
'name': name,
|
||||
'policy': policy,
|
||||
}
|
||||
if id is not None:
|
||||
kwargs['id'] = id
|
||||
|
||||
Reference in new issue
Block a user