aboutsummaryrefslogtreecommitdiffstats
path: root/apps/admin_audit/lib/AppInfo/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/admin_audit/lib/AppInfo/Application.php')
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
index de45bb9bcdd..63a1d065bc8 100644
--- a/apps/admin_audit/lib/AppInfo/Application.php
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -27,6 +27,7 @@ use OCA\AdminAudit\Listener\GroupManagementEventListener;
use OCA\AdminAudit\Listener\SecurityEventListener;
use OCA\AdminAudit\Listener\SharingEventListener;
use OCA\AdminAudit\Listener\UserManagementEventListener;
+use OCA\Files_Versions\Events\VersionRestoredEvent;
use OCP\App\Events\AppDisableEvent;
use OCP\App\Events\AppEnableEvent;
use OCP\App\Events\AppUpdateEvent;
@@ -34,13 +35,13 @@ use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
+use OCP\Authentication\Events\AnyLoginFailedEvent;
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed;
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed;
use OCP\Console\ConsoleEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
use OCP\Files\Events\Node\BeforeNodeReadEvent;
-use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
use OCP\Files\Events\Node\NodeCopiedEvent;
use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeRenamedEvent;
@@ -105,9 +106,11 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(UserLoggedInWithCookieEvent::class, AuthEventListener::class);
$context->registerEventListener(UserLoggedInEvent::class, AuthEventListener::class);
$context->registerEventListener(BeforeUserLoggedOutEvent::class, AuthEventListener::class);
+ $context->registerEventListener(AnyLoginFailedEvent::class, AuthEventListener::class);
// File events
$context->registerEventListener(BeforePreviewFetchedEvent::class, FileEventListener::class);
+ $context->registerEventListener(VersionRestoredEvent::class, FileEventListener::class);
// Security events
$context->registerEventListener(TwoFactorProviderChallengePassed::class, SecurityEventListener::class);
@@ -167,13 +170,6 @@ class Application extends App implements IBootstrap {
$fileActions = new Files($logger);
$eventDispatcher->addListener(
- BeforeNodeRenamedEvent::class,
- function (BeforeNodeRenamedEvent $event) use ($fileActions): void {
- $fileActions->beforeRename($event);
- }
- );
-
- $eventDispatcher->addListener(
NodeRenamedEvent::class,
function (NodeRenamedEvent $event) use ($fileActions): void {
$fileActions->afterRename($event);
@@ -218,7 +214,6 @@ class Application extends App implements IBootstrap {
private function versionsHooks(IAuditLogger $logger): void {
$versionsActions = new Versions($logger);
- Util::connectHook('\OCP\Versions', 'rollback', $versionsActions, 'rollback');
Util::connectHook('\OCP\Versions', 'delete', $versionsActions, 'delete');
}