diff options
author | Joas Schilling <coding@schilljs.com> | 2021-04-09 13:50:02 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-04-09 13:51:57 +0300 |
commit | 99e53672089b09bc1ed7a7bb5c83f8a552a5aa5e (patch) | |
tree | 405e29a103f8a4e3fd04716656e956f53738db45 /apps/admin_audit | |
parent | ca939214bd8c7f481da7bda290f82508d6a5792a (diff) |
Move to another namespace and class name
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r-- | apps/admin_audit/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | apps/admin_audit/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 6 | ||||
-rw-r--r-- | apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php (renamed from apps/admin_audit/lib/Listener/AuditEventListener.php) | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/admin_audit/composer/composer/autoload_classmap.php b/apps/admin_audit/composer/composer/autoload_classmap.php index 1d9fde9045e..e52032ca3ea 100644 --- a/apps/admin_audit/composer/composer/autoload_classmap.php +++ b/apps/admin_audit/composer/composer/autoload_classmap.php @@ -20,5 +20,5 @@ return array( 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php', 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php', - 'OCA\\AdminAudit\\Listener\\AuditEventListener' => $baseDir . '/../lib/Listener/AuditEventListener.php', + 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php', ); diff --git a/apps/admin_audit/composer/composer/autoload_static.php b/apps/admin_audit/composer/composer/autoload_static.php index b6556883ed4..829bc2ab049 100644 --- a/apps/admin_audit/composer/composer/autoload_static.php +++ b/apps/admin_audit/composer/composer/autoload_static.php @@ -35,7 +35,7 @@ class ComposerStaticInitAdminAudit 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php', 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php', - 'OCA\\AdminAudit\\Listener\\AuditEventListener' => __DIR__ . '/..' . '/../lib/Listener/AuditEventListener.php', + 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__ . '/..' . '/../lib/Listener/CriticalActionPerformedEventListener.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 47290e0525d..4ee49e7129b 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -49,7 +49,7 @@ use OCA\AdminAudit\Actions\Sharing; use OCA\AdminAudit\Actions\Trashbin; use OCA\AdminAudit\Actions\UserManagement; use OCA\AdminAudit\Actions\Versions; -use OCA\AdminAudit\Listener\AuditEventListener; +use OCA\AdminAudit\Listener\CriticalActionPerformedEventListener; use OCP\App\ManagerEvent; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; @@ -62,7 +62,7 @@ use OCP\IGroupManager; use OCP\IPreview; use OCP\IServerContainer; use OCP\IUserSession; -use OCP\Log\AuditEvent; +use OCP\Log\Audit\CriticalActionPerformedEvent; use OCP\Log\ILogFactory; use OCP\Share; use OCP\Util; @@ -80,7 +80,7 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { - $context->registerEventListener(AuditEvent::class, AuditEventListener::class); + $context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class); } public function boot(IBootContext $context): void { diff --git a/apps/admin_audit/lib/Listener/AuditEventListener.php b/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php index 0e2e5561858..75f7d86d421 100644 --- a/apps/admin_audit/lib/Listener/AuditEventListener.php +++ b/apps/admin_audit/lib/Listener/CriticalActionPerformedEventListener.php @@ -26,11 +26,11 @@ namespace OCA\AdminAudit\Listener; use OCA\AdminAudit\Actions\Action; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\Log\AuditEvent; +use OCP\Log\Audit\CriticalActionPerformedEvent; -class AuditEventListener extends Action implements IEventListener { +class CriticalActionPerformedEventListener extends Action implements IEventListener { public function handle(Event $event): void { - if (!($event instanceof AuditEvent)) { + if (!($event instanceof CriticalActionPerformedEvent)) { return; } |