From 4a85e112d22314b8569c5e391e099597e007258b Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 24 Sep 2015 19:23:49 +0200 Subject: [PATCH] Don't link to loaded modules in the about page if the user doesn't have the required permission refs #9381 --- application/controllers/AboutController.php | 1 + application/views/scripts/about/index.phtml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/AboutController.php b/application/controllers/AboutController.php index f4ff2fb3c..f9f5be5b0 100644 --- a/application/controllers/AboutController.php +++ b/application/controllers/AboutController.php @@ -11,6 +11,7 @@ class AboutController extends ActionController { public function indexAction() { + $this->view->hasPermission = $this->hasPermission('config/modules'); $this->view->version = Version::get(); $this->view->modules = Icinga::app()->getModuleManager()->getLoadedModules(); } diff --git a/application/views/scripts/about/index.phtml b/application/views/scripts/about/index.phtml index a85407f22..76c23943c 100644 --- a/application/views/scripts/about/index.phtml +++ b/application/views/scripts/about/index.phtml @@ -36,12 +36,12 @@ $name = $module->getName(); ?> - qlink( + qlink( $name, 'config/module/', array('name' => $name), array('title' => sprintf($this->translate('Show the overview of the %s module'), $name)) - ) ?> + ) : $name ?> getVersion() ?>