Don't link to loaded modules in the about page if the user doesn't have the required permission

refs #9381
This commit is contained in:
Alexander A. Klimov 2015-09-24 19:23:49 +02:00
parent f64db890d2
commit 4a85e112d2
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ class AboutController extends ActionController
{ {
public function indexAction() public function indexAction()
{ {
$this->view->hasPermission = $this->hasPermission('config/modules');
$this->view->version = Version::get(); $this->view->version = Version::get();
$this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules(); $this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules();
} }

View File

@ -36,12 +36,12 @@
$name = $module->getName(); $name = $module->getName();
?> ?>
<tr> <tr>
<td><?= $this->qlink( <td><?= $hasPermission ? $this->qlink(
$name, $name,
'config/module/', 'config/module/',
array('name' => $name), array('name' => $name),
array('title' => sprintf($this->translate('Show the overview of the %s module'), $name)) array('title' => sprintf($this->translate('Show the overview of the %s module'), $name))
) ?></td> ) : $name ?></td>
<td><?= $module->getVersion() ?></td> <td><?= $module->getVersion() ?></td>
</tr> </tr>
<?php } ?> <?php } ?>