fix: preserve scoped utility topology and refresh sessions across tabs
This commit is contained in:
1 parent
1d67e8ceba
commit
984d9af232
6 files changed
+58
-24
No files matched your search
@@ -33,7 +33,7 @@ $as('reader');
|
||||
$tree = $method('visibleTree', $method('objectTree'));
|
||||
check(count($tree['variables']) === 9, 'Global readers see every variable and the schedule');
|
||||
check(!in_array(888, array_column(array_column($tree['variables'], 'attributes'), 'symcon_id'), true), 'All means the visualization, never unrelated Symcon variables');
|
||||
check($tree['objects'] === [], 'Users never receive the full native picker');
|
||||
check(!in_array(888, array_column($tree['objects'], 'object_id'), true), 'Users never receive unrelated native object branches');
|
||||
foreach ($tree['variables'] as $v) check($v['attributes']['symcon_can_control'] === false, 'Every reader value is marked readonly');
|
||||
$denied(fn() => $method('authorizeApi', 'variables/action', ['data' => ['entity_id' => 'light.101']]), 'control_forbidden');
|
||||
|
||||
@@ -49,6 +49,14 @@ $denied(fn() => $method('authorizeApi', 'archive/trend', ['entity_id' => 'sensor
|
||||
$building = $method('visibleBuilding');
|
||||
check($building['floors'][0]['rooms'][1]['climate']['temperature'] === 'none', 'Foreign room climate is removed');
|
||||
check($building['floors'][0]['placements'][1]['entity_id'] === 'none', 'Foreign placement link is removed even while its geometry stays');
|
||||
$topology = $method('objectTree');
|
||||
foreach ($topology['objects'] as &$node) if ($node['object_id'] === 103) $node['parent_id'] = 11;
|
||||
unset($node);
|
||||
$topology['objects'][] = ['object_id' => 11, 'parent_id' => 10, 'name' => 'Strom', 'path' => 'Gebäude / Büro 2 / Strom', 'object_type' => 0];
|
||||
$as('office');
|
||||
$withTopology = $method('visibleTree', $topology);
|
||||
check(in_array(11, array_column($withTopology['objects'], 'object_id'), true), 'Utility discovery retains an authorized meter category');
|
||||
check(!in_array(900, array_column($withTopology['objects'], 'object_id'), true), 'Unrelated instance branches remain private');
|
||||
|
||||
$as('device');
|
||||
$tree = $method('visibleTree', $method('objectTree'));
|
||||
|
||||
Reference in new issue
Block a user