diff --git a/apps/admin_audit/lib/Actions/TagManagement.php b/apps/admin_audit/lib/Actions/TagManagement.php new file mode 100644 index 0000000000000..0e4e38b1f51bd --- /dev/null +++ b/apps/admin_audit/lib/Actions/TagManagement.php @@ -0,0 +1,39 @@ + + * + * @author Joas Schilling + * @author Roeland Jago Douma + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OCA\AdminAudit\Actions; + +class TagManagement extends Action { + /** + * @param string $appName + */ + public function createTag(string $appName): void { + $this->log('Tag "%s" created by', + ['app' => $appName], + ['app'] + ); + } +} diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index e4a1c7ec83a92..1915f4d53eda5 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -42,6 +42,7 @@ use OCA\AdminAudit\Actions\GroupManagement; use OCA\AdminAudit\Actions\Security; use OCA\AdminAudit\Actions\Sharing; +use OCA\AdminAudit\Actions\TagManagement; use OCA\AdminAudit\Actions\Trashbin; use OCA\AdminAudit\Actions\UserManagement; use OCA\AdminAudit\Actions\Versions; @@ -198,8 +199,8 @@ private function consoleHooks(IAuditLogger $logger, private function tagHooks(IAuditLogger $logger, IEventDispatcher $eventDispatcher): void { $eventDispatcher->addListener(\OCP\SystemTag\ManagerEvent::EVENT_CREATE, function (\OCP\SystemTag\ManagerEvent $event) use ($logger) { - $appActions = new Console($logger); - $appActions->runCommand([$event->getTag()->getName()]); + $appActions = new TagManagement($logger); + $appActions->createTag($event->getTag()->getName()); }); }