Move to another namespace and class name
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
ca939214bd
commit
99e5367208
|
@ -20,5 +20,5 @@ return array(
|
||||||
'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php',
|
'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php',
|
||||||
'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
|
'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
|
||||||
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.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',
|
||||||
);
|
);
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ComposerStaticInitAdminAudit
|
||||||
'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php',
|
'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php',
|
||||||
'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
|
'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
|
||||||
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.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)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
|
|
|
@ -49,7 +49,7 @@ use OCA\AdminAudit\Actions\Sharing;
|
||||||
use OCA\AdminAudit\Actions\Trashbin;
|
use OCA\AdminAudit\Actions\Trashbin;
|
||||||
use OCA\AdminAudit\Actions\UserManagement;
|
use OCA\AdminAudit\Actions\UserManagement;
|
||||||
use OCA\AdminAudit\Actions\Versions;
|
use OCA\AdminAudit\Actions\Versions;
|
||||||
use OCA\AdminAudit\Listener\AuditEventListener;
|
use OCA\AdminAudit\Listener\CriticalActionPerformedEventListener;
|
||||||
use OCP\App\ManagerEvent;
|
use OCP\App\ManagerEvent;
|
||||||
use OCP\AppFramework\App;
|
use OCP\AppFramework\App;
|
||||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||||
|
@ -62,7 +62,7 @@ use OCP\IGroupManager;
|
||||||
use OCP\IPreview;
|
use OCP\IPreview;
|
||||||
use OCP\IServerContainer;
|
use OCP\IServerContainer;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\Log\AuditEvent;
|
use OCP\Log\Audit\CriticalActionPerformedEvent;
|
||||||
use OCP\Log\ILogFactory;
|
use OCP\Log\ILogFactory;
|
||||||
use OCP\Share;
|
use OCP\Share;
|
||||||
use OCP\Util;
|
use OCP\Util;
|
||||||
|
@ -80,7 +80,7 @@ class Application extends App implements IBootstrap {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function register(IRegistrationContext $context): void {
|
public function register(IRegistrationContext $context): void {
|
||||||
$context->registerEventListener(AuditEvent::class, AuditEventListener::class);
|
$context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function boot(IBootContext $context): void {
|
public function boot(IBootContext $context): void {
|
||||||
|
|
|
@ -26,11 +26,11 @@ namespace OCA\AdminAudit\Listener;
|
||||||
use OCA\AdminAudit\Actions\Action;
|
use OCA\AdminAudit\Actions\Action;
|
||||||
use OCP\EventDispatcher\Event;
|
use OCP\EventDispatcher\Event;
|
||||||
use OCP\EventDispatcher\IEventListener;
|
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 {
|
public function handle(Event $event): void {
|
||||||
if (!($event instanceof AuditEvent)) {
|
if (!($event instanceof CriticalActionPerformedEvent)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -422,7 +422,7 @@ return array(
|
||||||
'OCP\\Lock\\LockedException' => $baseDir . '/lib/public/Lock/LockedException.php',
|
'OCP\\Lock\\LockedException' => $baseDir . '/lib/public/Lock/LockedException.php',
|
||||||
'OCP\\Lock\\ManuallyLockedException' => $baseDir . '/lib/public/Lock/ManuallyLockedException.php',
|
'OCP\\Lock\\ManuallyLockedException' => $baseDir . '/lib/public/Lock/ManuallyLockedException.php',
|
||||||
'OCP\\Lockdown\\ILockdownManager' => $baseDir . '/lib/public/Lockdown/ILockdownManager.php',
|
'OCP\\Lockdown\\ILockdownManager' => $baseDir . '/lib/public/Lockdown/ILockdownManager.php',
|
||||||
'OCP\\Log\\AuditEvent' => $baseDir . '/lib/public/Log/AuditEvent.php',
|
'OCP\\Log\\Audit\\CriticalActionPerformedEvent' => $baseDir . '/lib/public/Log/Audit/CriticalActionPerformedEvent.php',
|
||||||
'OCP\\Log\\IDataLogger' => $baseDir . '/lib/public/Log/IDataLogger.php',
|
'OCP\\Log\\IDataLogger' => $baseDir . '/lib/public/Log/IDataLogger.php',
|
||||||
'OCP\\Log\\IFileBased' => $baseDir . '/lib/public/Log/IFileBased.php',
|
'OCP\\Log\\IFileBased' => $baseDir . '/lib/public/Log/IFileBased.php',
|
||||||
'OCP\\Log\\ILogFactory' => $baseDir . '/lib/public/Log/ILogFactory.php',
|
'OCP\\Log\\ILogFactory' => $baseDir . '/lib/public/Log/ILogFactory.php',
|
||||||
|
|
|
@ -451,7 +451,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
||||||
'OCP\\Lock\\LockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/LockedException.php',
|
'OCP\\Lock\\LockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/LockedException.php',
|
||||||
'OCP\\Lock\\ManuallyLockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/ManuallyLockedException.php',
|
'OCP\\Lock\\ManuallyLockedException' => __DIR__ . '/../../..' . '/lib/public/Lock/ManuallyLockedException.php',
|
||||||
'OCP\\Lockdown\\ILockdownManager' => __DIR__ . '/../../..' . '/lib/public/Lockdown/ILockdownManager.php',
|
'OCP\\Lockdown\\ILockdownManager' => __DIR__ . '/../../..' . '/lib/public/Lockdown/ILockdownManager.php',
|
||||||
'OCP\\Log\\AuditEvent' => __DIR__ . '/../../..' . '/lib/public/Log/AuditEvent.php',
|
'OCP\\Log\\Audit\\CriticalActionPerformedEvent' => __DIR__ . '/../../..' . '/lib/public/Log/Audit/CriticalActionPerformedEvent.php',
|
||||||
'OCP\\Log\\IDataLogger' => __DIR__ . '/../../..' . '/lib/public/Log/IDataLogger.php',
|
'OCP\\Log\\IDataLogger' => __DIR__ . '/../../..' . '/lib/public/Log/IDataLogger.php',
|
||||||
'OCP\\Log\\IFileBased' => __DIR__ . '/../../..' . '/lib/public/Log/IFileBased.php',
|
'OCP\\Log\\IFileBased' => __DIR__ . '/../../..' . '/lib/public/Log/IFileBased.php',
|
||||||
'OCP\\Log\\ILogFactory' => __DIR__ . '/../../..' . '/lib/public/Log/ILogFactory.php',
|
'OCP\\Log\\ILogFactory' => __DIR__ . '/../../..' . '/lib/public/Log/ILogFactory.php',
|
||||||
|
|
|
@ -24,7 +24,7 @@ declare(strict_types=1);
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCP\Log;
|
namespace OCP\Log\Audit;
|
||||||
|
|
||||||
use OCP\EventDispatcher\Event;
|
use OCP\EventDispatcher\Event;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ use OCP\EventDispatcher\Event;
|
||||||
*
|
*
|
||||||
* @since 22.0.0
|
* @since 22.0.0
|
||||||
*/
|
*/
|
||||||
class AuditEvent extends Event {
|
class CriticalActionPerformedEvent extends Event {
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $logMessage;
|
private $logMessage;
|
Loading…
Reference in New Issue