From d76d47b12fdcc9e127d023661e806cf2ca8e7715 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:25:24 +0200 Subject: Adding upstream version 1.1.1. Signed-off-by: Daniel Baumann --- configuration.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 configuration.php (limited to 'configuration.php') diff --git a/configuration.php b/configuration.php new file mode 100644 index 0000000..f6dcf64 --- /dev/null +++ b/configuration.php @@ -0,0 +1,41 @@ +menuSection(N_('Maps')) + ->setUrl('nagvis/show/map') + ->setIcon('globe'); + +$prio = 0; +$restriction = RestrictionHelper::getRegex(); +foreach (Config::module('nagvis')->getSection('menu') as $name => $caption) { + if ($restriction !== null && ! preg_match($restriction, $name)) { + continue; + } + $section->add($caption, array( + 'url' => 'nagvis/show/map', + 'urlParameters' => array('map' => $name), + 'priority' => ++$prio + )); +} + +$this->providePermission( + 'nagvis/edit', + $this->translate('Modify NagVis maps') +); + +$this->providePermission( + 'nagvis/admin', + $this->translate('Nagvis administration') +); + +$this->providePermission( + 'nagvis/overview', + $this->translate('NagVis general overview') +); + +$this->provideRestriction( + 'nagvis/map/filter', + $this->translate('Filter NagVis maps') +); -- cgit v1.2.3