fix: 修复插件卸载权限调用错误
This commit is contained in:
@@ -12,6 +12,7 @@ declare (strict_types=1);
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
namespace app\admin\controller\system;
|
namespace app\admin\controller\system;
|
||||||
|
use app\admin\service\AuthService;
|
||||||
use GuzzleHttp\Exception\TransferException;
|
use GuzzleHttp\Exception\TransferException;
|
||||||
use process\Monitor;
|
use process\Monitor;
|
||||||
use support\Response;
|
use support\Response;
|
||||||
@@ -124,7 +125,7 @@ class Plugin extends AdminController
|
|||||||
$pluginPath = plugin_path($name);
|
$pluginPath = plugin_path($name);
|
||||||
$pluginClass = get_plugin_instance($name);
|
$pluginClass = get_plugin_instance($name);
|
||||||
$pluginClass->uninstall();
|
$pluginClass->uninstall();
|
||||||
if (get_env('APP_DEBUG') && Auth::instance()->SuperAdmin()) {
|
if (get_env('APP_DEBUG') && AuthService::instance()->SuperAdmin()) {
|
||||||
self::executeSql($name, 'uninstall');
|
self::executeSql($name, 'uninstall');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user