mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
System groups (#18303)
* Add read only and admin policies * Migrate to 2 system groups * Add system groups * Add system groups admin & read only * Dont' mutate parameters * Fix types
This commit is contained in:
@@ -15,6 +15,7 @@ from contextlib import contextmanager
|
||||
from homeassistant import auth, core as ha, config_entries
|
||||
from homeassistant.auth import (
|
||||
models as auth_models, auth_store, providers as auth_providers)
|
||||
from homeassistant.auth.permissions import system_policies
|
||||
from homeassistant.setup import setup_component, async_setup_component
|
||||
from homeassistant.config import async_process_component_config
|
||||
from homeassistant.helpers import (
|
||||
@@ -349,7 +350,7 @@ class MockGroup(auth_models.Group):
|
||||
"""Mock a group in Home Assistant."""
|
||||
|
||||
def __init__(self, id=None, name='Mock Group',
|
||||
policy=auth_store.DEFAULT_POLICY):
|
||||
policy=system_policies.ADMIN_POLICY):
|
||||
"""Mock a group."""
|
||||
kwargs = {
|
||||
'name': name,
|
||||
|
||||
Reference in New Issue
Block a user