@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | public function register(IRegistrationContext $context): void { |
85 | - $context->registerService(IAuditLogger::class, function (ContainerInterface $c) { |
|
85 | + $context->registerService(IAuditLogger::class, function(ContainerInterface $c) { |
|
86 | 86 | return new AuditLogger($c->get(ILogFactory::class), $c->get(Iconfig::class)); |
87 | 87 | }); |
88 | 88 | |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | |
171 | 171 | private function appHooks(IAuditLogger $logger, |
172 | 172 | EventDispatcherInterface $eventDispatcher): void { |
173 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) { |
|
173 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function(ManagerEvent $event) use ($logger) { |
|
174 | 174 | $appActions = new AppManagement($logger); |
175 | 175 | $appActions->enableApp($event->getAppID()); |
176 | 176 | }); |
177 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function (ManagerEvent $event) use ($logger) { |
|
177 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function(ManagerEvent $event) use ($logger) { |
|
178 | 178 | $appActions = new AppManagement($logger); |
179 | 179 | $appActions->enableAppForGroups($event->getAppID(), $event->getGroups()); |
180 | 180 | }); |
181 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function (ManagerEvent $event) use ($logger) { |
|
181 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function(ManagerEvent $event) use ($logger) { |
|
182 | 182 | $appActions = new AppManagement($logger); |
183 | 183 | $appActions->disableApp($event->getAppID()); |
184 | 184 | }); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | private function consoleHooks(IAuditLogger $logger, |
188 | 188 | EventDispatcherInterface $eventDispatcher): void { |
189 | - $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function (ConsoleEvent $event) use ($logger) { |
|
189 | + $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function(ConsoleEvent $event) use ($logger) { |
|
190 | 190 | $appActions = new Console($logger); |
191 | 191 | $appActions->runCommand($event->getArguments()); |
192 | 192 | }); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $fileActions = new Files($logger); |
198 | 198 | $eventDispatcher->addListener( |
199 | 199 | IPreview::EVENT, |
200 | - function (GenericEvent $event) use ($fileActions) { |
|
200 | + function(GenericEvent $event) use ($fileActions) { |
|
201 | 201 | /** @var File $file */ |
202 | 202 | $file = $event->getSubject(); |
203 | 203 | $fileActions->preview([ |
@@ -268,11 +268,11 @@ discard block |
||
268 | 268 | |
269 | 269 | private function securityHooks(IAuditLogger $logger, |
270 | 270 | EventDispatcherInterface $eventDispatcher): void { |
271 | - $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function (GenericEvent $event) use ($logger) { |
|
271 | + $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function(GenericEvent $event) use ($logger) { |
|
272 | 272 | $security = new Security($logger); |
273 | 273 | $security->twofactorSuccess($event->getSubject(), $event->getArguments()); |
274 | 274 | }); |
275 | - $eventDispatcher->addListener(IProvider::EVENT_FAILED, function (GenericEvent $event) use ($logger) { |
|
275 | + $eventDispatcher->addListener(IProvider::EVENT_FAILED, function(GenericEvent $event) use ($logger) { |
|
276 | 276 | $security = new Security($logger); |
277 | 277 | $security->twofactorFailed($event->getSubject(), $event->getArguments()); |
278 | 278 | }); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $logFile = $config->getSystemValueString('logfile_audit', ''); |
43 | 43 | |
44 | 44 | if ($auditType === 'file' && !$logFile) { |
45 | - $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/audit.log'; |
|
45 | + $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/audit.log'; |
|
46 | 46 | // Legacy way was appconfig, now it's paralleled with the normal log config |
47 | 47 | $logFile = $config->getAppValue('admin_audit', 'logfile', $default); |
48 | 48 | } |
@@ -6,21 +6,21 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php', |
|
11 | - 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php', |
|
12 | - 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php', |
|
13 | - 'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php', |
|
14 | - 'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php', |
|
15 | - 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php', |
|
16 | - 'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php', |
|
17 | - 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php', |
|
18 | - 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php', |
|
19 | - 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php', |
|
20 | - 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php', |
|
21 | - 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
22 | - 'OCA\\AdminAudit\\AuditLogger' => $baseDir . '/../lib/AuditLogger.php', |
|
23 | - 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php', |
|
24 | - 'OCA\\AdminAudit\\IAuditLogger' => $baseDir . '/../lib/IAuditLogger.php', |
|
25 | - 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'OCA\\AdminAudit\\Actions\\Action' => $baseDir.'/../lib/Actions/Action.php', |
|
11 | + 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir.'/../lib/Actions/AppManagement.php', |
|
12 | + 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir.'/../lib/Actions/Auth.php', |
|
13 | + 'OCA\\AdminAudit\\Actions\\Console' => $baseDir.'/../lib/Actions/Console.php', |
|
14 | + 'OCA\\AdminAudit\\Actions\\Files' => $baseDir.'/../lib/Actions/Files.php', |
|
15 | + 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir.'/../lib/Actions/GroupManagement.php', |
|
16 | + 'OCA\\AdminAudit\\Actions\\Security' => $baseDir.'/../lib/Actions/Security.php', |
|
17 | + 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir.'/../lib/Actions/Sharing.php', |
|
18 | + 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir.'/../lib/Actions/Trashbin.php', |
|
19 | + 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir.'/../lib/Actions/UserManagement.php', |
|
20 | + 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir.'/../lib/Actions/Versions.php', |
|
21 | + 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
22 | + 'OCA\\AdminAudit\\AuditLogger' => $baseDir.'/../lib/AuditLogger.php', |
|
23 | + 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir.'/../lib/BackgroundJobs/Rotate.php', |
|
24 | + 'OCA\\AdminAudit\\IAuditLogger' => $baseDir.'/../lib/IAuditLogger.php', |
|
25 | + 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir.'/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
26 | 26 | ); |
@@ -6,43 +6,43 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitAdminAudit |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\AdminAudit\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\AdminAudit\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
25 | - 'OCA\\AdminAudit\\Actions\\Action' => __DIR__ . '/..' . '/../lib/Actions/Action.php', |
|
26 | - 'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__ . '/..' . '/../lib/Actions/AppManagement.php', |
|
27 | - 'OCA\\AdminAudit\\Actions\\Auth' => __DIR__ . '/..' . '/../lib/Actions/Auth.php', |
|
28 | - 'OCA\\AdminAudit\\Actions\\Console' => __DIR__ . '/..' . '/../lib/Actions/Console.php', |
|
29 | - 'OCA\\AdminAudit\\Actions\\Files' => __DIR__ . '/..' . '/../lib/Actions/Files.php', |
|
30 | - 'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__ . '/..' . '/../lib/Actions/GroupManagement.php', |
|
31 | - 'OCA\\AdminAudit\\Actions\\Security' => __DIR__ . '/..' . '/../lib/Actions/Security.php', |
|
32 | - 'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__ . '/..' . '/../lib/Actions/Sharing.php', |
|
33 | - 'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__ . '/..' . '/../lib/Actions/Trashbin.php', |
|
34 | - 'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__ . '/..' . '/../lib/Actions/UserManagement.php', |
|
35 | - 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php', |
|
36 | - 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
37 | - 'OCA\\AdminAudit\\AuditLogger' => __DIR__ . '/..' . '/../lib/AuditLogger.php', |
|
38 | - 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php', |
|
39 | - 'OCA\\AdminAudit\\IAuditLogger' => __DIR__ . '/..' . '/../lib/IAuditLogger.php', |
|
40 | - 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__ . '/..' . '/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
25 | + 'OCA\\AdminAudit\\Actions\\Action' => __DIR__.'/..'.'/../lib/Actions/Action.php', |
|
26 | + 'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__.'/..'.'/../lib/Actions/AppManagement.php', |
|
27 | + 'OCA\\AdminAudit\\Actions\\Auth' => __DIR__.'/..'.'/../lib/Actions/Auth.php', |
|
28 | + 'OCA\\AdminAudit\\Actions\\Console' => __DIR__.'/..'.'/../lib/Actions/Console.php', |
|
29 | + 'OCA\\AdminAudit\\Actions\\Files' => __DIR__.'/..'.'/../lib/Actions/Files.php', |
|
30 | + 'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__.'/..'.'/../lib/Actions/GroupManagement.php', |
|
31 | + 'OCA\\AdminAudit\\Actions\\Security' => __DIR__.'/..'.'/../lib/Actions/Security.php', |
|
32 | + 'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__.'/..'.'/../lib/Actions/Sharing.php', |
|
33 | + 'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__.'/..'.'/../lib/Actions/Trashbin.php', |
|
34 | + 'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__.'/..'.'/../lib/Actions/UserManagement.php', |
|
35 | + 'OCA\\AdminAudit\\Actions\\Versions' => __DIR__.'/..'.'/../lib/Actions/Versions.php', |
|
36 | + 'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
37 | + 'OCA\\AdminAudit\\AuditLogger' => __DIR__.'/..'.'/../lib/AuditLogger.php', |
|
38 | + 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__.'/..'.'/../lib/BackgroundJobs/Rotate.php', |
|
39 | + 'OCA\\AdminAudit\\IAuditLogger' => __DIR__.'/..'.'/../lib/IAuditLogger.php', |
|
40 | + 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__.'/..'.'/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
41 | 41 | ); |
42 | 42 | |
43 | 43 | public static function getInitializer(ClassLoader $loader) |
44 | 44 | { |
45 | - return \Closure::bind(function () use ($loader) { |
|
45 | + return \Closure::bind(function() use ($loader) { |
|
46 | 46 | $loader->prefixLengthsPsr4 = ComposerStaticInitAdminAudit::$prefixLengthsPsr4; |
47 | 47 | $loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4; |
48 | 48 | $loader->classMap = ComposerStaticInitAdminAudit::$classMap; |