refactor(security): type firewall policy events
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ namespace KTXC\Service;
|
||||
|
||||
use KTXC\Models\Tenant\TenantConfiguration;
|
||||
use KTXF\Event\EventDispatcherInterface;
|
||||
use KTXC\Security\Event\SecurityEvent;
|
||||
use KTXC\Security\Event\FirewallSettingsUpdatedEvent;
|
||||
|
||||
final class FirewallSettingsService
|
||||
{
|
||||
@@ -52,16 +52,13 @@ final class FirewallSettingsService
|
||||
$tenant->setConfiguration($configuration);
|
||||
$this->tenants->deposit($tenant);
|
||||
|
||||
$event = new SecurityEvent(
|
||||
SecurityEvent::FIREWALL_SETTINGS_UPDATED,
|
||||
[
|
||||
'changeReason' => $reason,
|
||||
'changeOrigin' => FirewallRuleManager::ORIGIN_MANUAL,
|
||||
'previous' => $previous,
|
||||
'current' => $current,
|
||||
],
|
||||
$event = new FirewallSettingsUpdatedEvent(
|
||||
changeReason: $reason,
|
||||
previous: $previous,
|
||||
current: $current,
|
||||
tenantId: $tenantId,
|
||||
identityId: $actorId,
|
||||
actorId: $actorId,
|
||||
changeOrigin: FirewallRuleManager::ORIGIN_MANUAL,
|
||||
);
|
||||
$this->events->dispatch($event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user