fix(firewall): enforce system rules independently of tenant context
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class FirewallRuleManagerTest extends TestCase
|
||||
public function testCacheInvalidation(): void
|
||||
{
|
||||
$this->store->expects($this->exactly(2))
|
||||
->method('listApplicableRules')
|
||||
->method('listRules')
|
||||
->with('tenant-a')
|
||||
->willReturnOnConsecutiveCalls([], []);
|
||||
$cache = new FirewallRuleCache($this->store);
|
||||
@@ -102,8 +102,8 @@ class FirewallRuleManagerTest extends TestCase
|
||||
$this->store->method('findExactIpRule')->willReturn(null);
|
||||
$this->store->method('depositRule')->willReturnArgument(0);
|
||||
|
||||
self::assertSame([], $cache->applicable('tenant-a'));
|
||||
self::assertSame([], $cache->tenant('tenant-a'));
|
||||
$manager->blockIp(FirewallRuleScope::tenant('tenant-a'), '203.0.113.10', null, 'admin');
|
||||
self::assertSame([], $cache->applicable('tenant-a'));
|
||||
self::assertSame([], $cache->tenant('tenant-a'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user