update app/admin/library/Auth.php.

异常会导致其他查询接口报错

Signed-off-by: 胡图图 <209766828@qq.com>
This commit is contained in:
胡图图
2022-08-25 04:50:00 +00:00
committed by Gitee
parent 3ef9177ea2
commit 2437b79ec2

View File

@@ -293,10 +293,6 @@ class Auth
}
} else {
if (!Event::hasListener('cmscategoryPermissions')) {
throw new \Exception('请安装CMS插件');
} else {
if (!$this->superAdmin()) {
if (!empty($auth_nodes[$class])) {
$list = Event::emit('cmscategoryPermissions', [
@@ -312,7 +308,6 @@ class Auth
], true);
}
}
}
return $tree ? ($list ? json_encode(list_to_tree($list)) : json_encode([])) : $list;
}