浏览代码

修复超级管理员隐藏的组别不显示的问题

Karson 1 年之前
父节点
当前提交
17eb182063
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/admin/library/Auth.php

+ 1 - 1
application/admin/library/Auth.php

@@ -339,7 +339,7 @@ class Auth extends \fast\Auth
             }
         }
         // 取出所有分组
-        $groupList = \app\admin\model\AuthGroup::where(['status' => 'normal'])->select();
+        $groupList = \app\admin\model\AuthGroup::where($this->isSuperAdmin() ? '1=1' : ['status' => 'normal'])->select();
         $objList = [];
         foreach ($groups as $k => $v) {
             if ($v['rules'] === '*') {