summaryrefslogtreecommitdiffstats
path: root/configuration.php
blob: 46ecf5cb7bfc25c097751bdd38a5d1c28a84af16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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..
}