diff options
Diffstat (limited to 'apps/admin_audit')
-rw-r--r-- | apps/admin_audit/l10n/be.js | 7 | ||||
-rw-r--r-- | apps/admin_audit/l10n/be.json | 5 | ||||
-rw-r--r-- | apps/admin_audit/l10n/bg.js | 4 | ||||
-rw-r--r-- | apps/admin_audit/l10n/bg.json | 4 | ||||
-rw-r--r-- | apps/admin_audit/l10n/eo.js | 2 | ||||
-rw-r--r-- | apps/admin_audit/l10n/eo.json | 2 | ||||
-rw-r--r-- | apps/admin_audit/l10n/es_CR.js | 3 | ||||
-rw-r--r-- | apps/admin_audit/l10n/es_CR.json | 3 | ||||
-rw-r--r-- | apps/admin_audit/l10n/id.js | 4 | ||||
-rw-r--r-- | apps/admin_audit/l10n/id.json | 4 | ||||
-rw-r--r-- | apps/admin_audit/l10n/sw.js | 7 | ||||
-rw-r--r-- | apps/admin_audit/l10n/sw.json | 5 | ||||
-rw-r--r-- | apps/admin_audit/lib/Actions/Files.php | 23 | ||||
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 8 |
14 files changed, 40 insertions, 41 deletions
diff --git a/apps/admin_audit/l10n/be.js b/apps/admin_audit/l10n/be.js new file mode 100644 index 00000000000..bb52accdf5c --- /dev/null +++ b/apps/admin_audit/l10n/be.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "admin_audit", + { + "Auditing / Logging" : "Аўдыт / Журнал", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Прадастаўляе магчымасці вядзення журнала дзенняў для Nextcloud, такіх як доступ да файлаў або іншых канфідэнцыйных дзеянняў." +}, +"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/apps/admin_audit/l10n/be.json b/apps/admin_audit/l10n/be.json new file mode 100644 index 00000000000..6b36dae579b --- /dev/null +++ b/apps/admin_audit/l10n/be.json @@ -0,0 +1,5 @@ +{ "translations": { + "Auditing / Logging" : "Аўдыт / Журнал", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Прадастаўляе магчымасці вядзення журнала дзенняў для Nextcloud, такіх як доступ да файлаў або іншых канфідэнцыйных дзеянняў." +},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" +}
\ No newline at end of file diff --git a/apps/admin_audit/l10n/bg.js b/apps/admin_audit/l10n/bg.js index cd82e96ec73..2769c6899f8 100644 --- a/apps/admin_audit/l10n/bg.js +++ b/apps/admin_audit/l10n/bg.js @@ -1,7 +1,7 @@ OC.L10N.register( "admin_audit", { - "Auditing / Logging" : "Одитиране/създаване на регистри", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Предоставя възможности за регистриране в Nextcloud, като например достъп до файлове за регистриране или други чувствителни действия." + "Auditing / Logging" : "Одитиране / Регистри на действията", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Предоставя възможности за създаване на регистри на действията в \"Nextcloud\", като например кой е осъществил достъп до файл или други действия." }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/admin_audit/l10n/bg.json b/apps/admin_audit/l10n/bg.json index 770ffcbf35a..4d3ac67c0a6 100644 --- a/apps/admin_audit/l10n/bg.json +++ b/apps/admin_audit/l10n/bg.json @@ -1,5 +1,5 @@ { "translations": { - "Auditing / Logging" : "Одитиране/създаване на регистри", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Предоставя възможности за регистриране в Nextcloud, като например достъп до файлове за регистриране или други чувствителни действия." + "Auditing / Logging" : "Одитиране / Регистри на действията", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Предоставя възможности за създаване на регистри на действията в \"Nextcloud\", като например кой е осъществил достъп до файл или други действия." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/admin_audit/l10n/eo.js b/apps/admin_audit/l10n/eo.js index 3ab916b0b54..17becacc88e 100644 --- a/apps/admin_audit/l10n/eo.js +++ b/apps/admin_audit/l10n/eo.js @@ -2,6 +2,6 @@ OC.L10N.register( "admin_audit", { "Auditing / Logging" : "Ekzamenado / Protokolado", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Provizi protokolado-kapablojn por Nextcloud, kiel ekzemple protokolado de aliroj al dosieroj aŭ aliaj delikataj agoj." + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Ebligas protokoladon, ekzemple protokolado de aliroj al dosieroj aŭ aliaj delikataj agoj." }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/admin_audit/l10n/eo.json b/apps/admin_audit/l10n/eo.json index eef1c6821c5..293d8cce025 100644 --- a/apps/admin_audit/l10n/eo.json +++ b/apps/admin_audit/l10n/eo.json @@ -1,5 +1,5 @@ { "translations": { "Auditing / Logging" : "Ekzamenado / Protokolado", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Provizi protokolado-kapablojn por Nextcloud, kiel ekzemple protokolado de aliroj al dosieroj aŭ aliaj delikataj agoj." + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Ebligas protokoladon, ekzemple protokolado de aliroj al dosieroj aŭ aliaj delikataj agoj." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/admin_audit/l10n/es_CR.js b/apps/admin_audit/l10n/es_CR.js index 554f249b125..a051b8053d3 100644 --- a/apps/admin_audit/l10n/es_CR.js +++ b/apps/admin_audit/l10n/es_CR.js @@ -1,6 +1,7 @@ OC.L10N.register( "admin_audit", { - "Auditing / Logging" : "Auditoría / Registros" + "Auditing / Logging" : "Auditoría / Registros", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Proporciona capacidades de registro para Nextcloud, como el registro de accesos a archivos o acciones sensibles." }, "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/apps/admin_audit/l10n/es_CR.json b/apps/admin_audit/l10n/es_CR.json index 772c7486a7b..00a101b11b8 100644 --- a/apps/admin_audit/l10n/es_CR.json +++ b/apps/admin_audit/l10n/es_CR.json @@ -1,4 +1,5 @@ { "translations": { - "Auditing / Logging" : "Auditoría / Registros" + "Auditing / Logging" : "Auditoría / Registros", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Proporciona capacidades de registro para Nextcloud, como el registro de accesos a archivos o acciones sensibles." },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/admin_audit/l10n/id.js b/apps/admin_audit/l10n/id.js index 441f1940069..144a85299f1 100644 --- a/apps/admin_audit/l10n/id.js +++ b/apps/admin_audit/l10n/id.js @@ -1,7 +1,7 @@ OC.L10N.register( "admin_audit", { - "Auditing / Logging" : "Pemeriksaan / Pencatatan", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kemampuan pencatatan untuk Nextcloud seperti pencatatan akses berkas atau tindakan sensitif lainnya." + "Auditing / Logging" : "Pengauditan/Pencatatan", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kemampuan pencatatan untuk Nextcloud, misalnya pencatatan akses file atau tindakan sensitif lainnya." }, "nplurals=1; plural=0;"); diff --git a/apps/admin_audit/l10n/id.json b/apps/admin_audit/l10n/id.json index 91af029f895..868f7c94d32 100644 --- a/apps/admin_audit/l10n/id.json +++ b/apps/admin_audit/l10n/id.json @@ -1,5 +1,5 @@ { "translations": { - "Auditing / Logging" : "Pemeriksaan / Pencatatan", - "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kemampuan pencatatan untuk Nextcloud seperti pencatatan akses berkas atau tindakan sensitif lainnya." + "Auditing / Logging" : "Pengauditan/Pencatatan", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Menyediakan kemampuan pencatatan untuk Nextcloud, misalnya pencatatan akses file atau tindakan sensitif lainnya." },"pluralForm" :"nplurals=1; plural=0;" }
\ No newline at end of file diff --git a/apps/admin_audit/l10n/sw.js b/apps/admin_audit/l10n/sw.js new file mode 100644 index 00000000000..58fd34da654 --- /dev/null +++ b/apps/admin_audit/l10n/sw.js @@ -0,0 +1,7 @@ +OC.L10N.register( + "admin_audit", + { + "Auditing / Logging" : "Ukaguzi/kuweka kumbukumbu", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Hutoa uwezo wa kuweka kumbukumbu kwa Nextcloud kama vile ufikiaji wa faili za kumbukumbu au vitendo nyeti." +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/admin_audit/l10n/sw.json b/apps/admin_audit/l10n/sw.json new file mode 100644 index 00000000000..3775e3f2982 --- /dev/null +++ b/apps/admin_audit/l10n/sw.json @@ -0,0 +1,5 @@ +{ "translations": { + "Auditing / Logging" : "Ukaguzi/kuweka kumbukumbu", + "Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Hutoa uwezo wa kuweka kumbukumbu kwa Nextcloud kama vile ufikiaji wa faili za kumbukumbu au vitendo nyeti." +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php index f07ed254272..7be4a7cd581 100644 --- a/apps/admin_audit/lib/Actions/Files.php +++ b/apps/admin_audit/lib/Actions/Files.php @@ -10,7 +10,6 @@ namespace OCA\AdminAudit\Actions; use OC\Files\Node\NonExistingFile; 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; @@ -26,9 +25,6 @@ use Psr\Log\LoggerInterface; * @package OCA\AdminAudit\Actions */ class Files extends Action { - - private array $renamedNodes = []; - /** * Logs file read actions */ @@ -55,28 +51,13 @@ class Files extends Action { /** * Logs rename actions of files */ - public function beforeRename(BeforeNodeRenamedEvent $event): void { - try { - $source = $event->getSource(); - $this->renamedNodes[$source->getId()] = $source; - } catch (InvalidPathException|NotFoundException $e) { - Server::get(LoggerInterface::class)->error( - 'Exception thrown in file rename: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e] - ); - return; - } - } - - /** - * Logs rename actions of files - */ public function afterRename(NodeRenamedEvent $event): void { try { $target = $event->getTarget(); - $originalSource = $this->renamedNodes[$target->getId()]; + $source = $event->getSource(); $params = [ 'newid' => $target->getId(), - 'oldpath' => $originalSource->getPath(), + 'oldpath' => $source->getPath(), 'newpath' => $target->getPath(), ]; } catch (InvalidPathException|NotFoundException $e) { diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index baf73b92b0d..63a1d065bc8 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -42,7 +42,6 @@ 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; @@ -171,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); |