summaryrefslogtreecommitdiffstats
path: root/configuration.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:13:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:13:17 +0000
commit968a206dff4631e1ecc8a489f7884d08648113aa (patch)
tree48747500fe157b459d74fac87e7114e6c846d215 /configuration.php
parentInitial commit. (diff)
downloadicingaweb2-module-audit-upstream.tar.xz
icingaweb2-module-audit-upstream.zip
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--configuration.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/configuration.php b/configuration.php
new file mode 100644
index 0000000..46ecf5c
--- /dev/null
+++ b/configuration.php
@@ -0,0 +1,26 @@
+<?php
+
+/* Icinga Web 2 | (c) 2018 Icinga Development Team | GPLv2+ */
+
+/** @var $this \Icinga\Application\Modules\Module */
+
+$this->provideConfigTab('config', [
+ 'url' => 'config',
+ 'title' => $this->translate('Configuration')
+]);
+
+$this->providePermission('audit/log', $this->translate('Allow access to the audit log'));
+
+try {
+ if ($this->getConfig()->get('log', 'type') === 'file') {
+ $section = $this->menuSection(N_('Reporting'));
+ $section->add(N_('Audit Log'), [
+ 'permission' => 'audit/log',
+ 'url' => 'audit/log',
+ 'icon' => 'eye',
+ 'priority' => 910
+ ]);
+ }
+} catch (Exception $e) {
+ // This pops up again sooner or later anyway..
+}