fix:修复管理员分组被禁用后还可以被远程select选择的问题

This commit is contained in:
妙码生花 2022-06-30 21:31:57 +08:00
parent 24112e2d78
commit 5b6523160f

View File

@ -207,7 +207,7 @@ class Group extends Backend
public function select()
{
$data = $this->getGroups();
$data = $this->getGroups([['status', '=', 1]]);
if ($this->assembleTree) {
$data = $this->tree->assembleTree($this->tree->getTreeArray($data, 'name'));
@ -217,12 +217,11 @@ class Group extends Backend
]);
}
public function getGroups()
public function getGroups($where = [])
{
$pk = $this->model->getPk();
$initKey = $this->request->get("initKey/s", $pk);
$where = [];
if ($this->keyword) {
$keyword = explode(' ', $this->keyword);
foreach ($keyword as $item) {