From 18a55e55c98fdf203b7710dd6202cb66d40ebf88 Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Sat, 8 Feb 2014 16:32:46 +0100 Subject: [PATCH] Added permission check for PHPInfoPage --- wcfsetup/install/files/acp/templates/index.tpl | 8 +++++++- wcfsetup/install/files/lib/acp/page/PHPInfoPage.class.php | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/acp/templates/index.tpl b/wcfsetup/install/files/acp/templates/index.tpl index 4a543acc29..339e35eeae 100644 --- a/wcfsetup/install/files/acp/templates/index.tpl +++ b/wcfsetup/install/files/acp/templates/index.tpl @@ -77,7 +77,13 @@
{lang}wcf.acp.index.system.php{/lang}
-
{PHP_VERSION}
+
+ {if $__wcf->session->getPermission('admin.system.package.canInstallPackage') && $__wcf->session->getPermission('admin.system.package.canUpdatePackage')} + {PHP_VERSION} + {else} + {PHP_VERSION} + {/if} +
diff --git a/wcfsetup/install/files/lib/acp/page/PHPInfoPage.class.php b/wcfsetup/install/files/lib/acp/page/PHPInfoPage.class.php index 94a7b9c94f..e8d340aa8e 100644 --- a/wcfsetup/install/files/lib/acp/page/PHPInfoPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/PHPInfoPage.class.php @@ -19,6 +19,11 @@ class PHPInfoPage extends AbstractPage { */ public $templateName = 'phpInfo'; + /** + * @see \wcf\page\AbstractPage::$neededPermissions + */ + public $neededPermissions = array('admin.system.package.canInstallPackage', 'admin.system.package.canUpdatePackage'); + /** * @see \wcf\page\IPage::assignVariables() */ -- 2.20.1