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:
parent
f64db890d2
commit
4a85e112d2
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 } ?>
|
||||||
|
|
Loading…
Reference in New Issue