do not show apcuinfo or opcacheinfo to users with change_serversettings=0

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2022-12-31 08:51:05 +01:00
parent fede81700e
commit 5a807e3dbe
No known key found for this signature in database
GPG Key ID: C121F97338D7A352
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ if (!function_exists('apcu_cache_info') || !function_exists('apcu_sma_info')) {
Response::standardError(lng('error.no_apcuinfo'));
}
if ($page == 'showinfo') {
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
$cache = apcu_cache_info();
$mem = apcu_sma_info();
$time = time();

View File

@ -50,7 +50,7 @@ if (!function_exists('opcache_get_configuration')) {
Response::standardError(lng('error.no_opcacheinfo'));
}
if ($page == 'showinfo') {
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
$time = time();
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed OPcache info");