From 753f6b9dcfe9c7b2f3c76fc84c929a9125ed5163 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Mon, 12 Oct 2020 14:15:41 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=E6=A8=A1=E5=9D=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=92=E9=99=A4=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/system/controller/Module.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/catch/system/controller/Module.php b/catch/system/controller/Module.php index 4ca9678..3644b8d 100644 --- a/catch/system/controller/Module.php +++ b/catch/system/controller/Module.php @@ -7,6 +7,7 @@ use catcher\CatchResponse; use catcher\CatchAdmin; use catcher\library\InstallCatchModule; use catcher\library\InstallLocalModule; +use catcher\Utils; use think\response\Json; class Module extends CatchController @@ -30,9 +31,11 @@ class Module extends CatchController array_multisort($orders, SORT_DESC, $modules); - foreach ($modules as $k => $module) { - if (!in_array($module['alias'], $hasModules)) { - unset($modules[$k]); + if (!Utils::isSuperAdmin()) { + foreach ($modules as $k => $module) { + if (!in_array($module['alias'], $hasModules)) { + unset($modules[$k]); + } } }