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:
parent
5961f2f577
commit
61f7a39748
7 changed files with 532 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue