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:
1 parent
54b0cde52a
commit
f7f0a4e811
14 files changed
+309
-68
No files matched your search
@@ -32,15 +32,3 @@ def test_owner_permissions():
|
||||
State('light.balcony', 'on'),
|
||||
]
|
||||
assert permissions.OwnerPermissions.filter_states(states) == states
|
||||
|
||||
|
||||
def test_default_policy_allow_all():
|
||||
"""Test that the default policy is to allow all entity actions."""
|
||||
perm = permissions.PolicyPermissions(permissions.DEFAULT_POLICY)
|
||||
assert perm.check_entity('light.kitchen', 'read')
|
||||
states = [
|
||||
State('light.kitchen', 'on'),
|
||||
State('light.living_room', 'off'),
|
||||
State('light.balcony', 'on'),
|
||||
]
|
||||
assert perm.filter_states(states) == states
|
||||
Reference in new issue
Block a user