File: configuration.php

package info (click to toggle)
icingaweb2-module-audit 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 344 kB
  • sloc: php: 240; makefile: 10
file content (25 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
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
<?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_('System'));
        $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..
}