fixed:模块列表排除超级管理员
This commit is contained in:
parent
bcb96cd3c4
commit
753f6b9dcf
@ -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,11 +31,13 @@ class Module extends CatchController
|
||||
|
||||
array_multisort($orders, SORT_DESC, $modules);
|
||||
|
||||
if (!Utils::isSuperAdmin()) {
|
||||
foreach ($modules as $k => $module) {
|
||||
if (!in_array($module['alias'], $hasModules)) {
|
||||
unset($modules[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return CatchResponse::success(array_values($modules));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user