作者 Karson

修复超级管理员无法在列表查看超级管理员的BUG

@@ -289,16 +289,24 @@ class Auth extends \fast\Auth @@ -289,16 +289,24 @@ class Auth extends \fast\Auth
289 */ 289 */
290 public function getChildrenAdminIds($withself = false) 290 public function getChildrenAdminIds($withself = false)
291 { 291 {
292 - $groupIds = $this->getChildrenGroupIds(false);  
293 $childrenAdminIds = []; 292 $childrenAdminIds = [];
294 - $authGroupList = model('AuthGroupAccess')  
295 - ->field('uid,group_id')  
296 - ->where('group_id', 'in', $groupIds)  
297 - ->select(); 293 + if (!$this->isSuperAdmin())
  294 + {
  295 + $groupIds = $this->getChildrenGroupIds(false);
  296 + $authGroupList = model('AuthGroupAccess')
  297 + ->field('uid,group_id')
  298 + ->where('group_id', 'in', $groupIds)
  299 + ->select();
298 300
299 - foreach ($authGroupList as $k => $v) 301 + foreach ($authGroupList as $k => $v)
  302 + {
  303 + $childrenAdminIds[] = $v['uid'];
  304 + }
  305 + }
  306 + else
300 { 307 {
301 - $childrenAdminIds[] = $v['uid']; 308 + //超级管理员拥有所有人的权限
  309 + $childrenAdminIds = Admin::column('id');
302 } 310 }
303 if ($withself) 311 if ($withself)
304 { 312 {