summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit/lib/AppInfo
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-09 10:32:45 +0200
committerJoas Schilling <coding@schilljs.com>2021-04-09 10:32:45 +0200
commitca939214bd8c7f481da7bda290f82508d6a5792a (patch)
tree5ad657e6fb47b2c4bba754da6022c577963b4033 /apps/admin_audit/lib/AppInfo
parent4d390770d1c7834cad9b313db1797336a8997773 (diff)
downloadnextcloud-server-ca939214bd8c7f481da7bda290f82508d6a5792a.tar.gz
nextcloud-server-ca939214bd8c7f481da7bda290f82508d6a5792a.zip
Allow apps to log actions into the audit_log
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/admin_audit/lib/AppInfo')
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
index d7afb96ea87..47290e0525d 100644
--- a/apps/admin_audit/lib/AppInfo/Application.php
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -49,6 +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 OCP\App\ManagerEvent;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
@@ -61,6 +62,7 @@ use OCP\IGroupManager;
use OCP\IPreview;
use OCP\IServerContainer;
use OCP\IUserSession;
+use OCP\Log\AuditEvent;
use OCP\Log\ILogFactory;
use OCP\Share;
use OCP\Util;
@@ -78,6 +80,7 @@ class Application extends App implements IBootstrap {
}
public function register(IRegistrationContext $context): void {
+ $context->registerEventListener(AuditEvent::class, AuditEventListener::class);
}
public function boot(IBootContext $context): void {