mirror of https://gitee.com/karson/fastadmin.git
修复超级管理员无法在列表查看超级管理员的BUG
parent
0c953105c8
commit
0ac468d85c
|
|
@ -289,16 +289,24 @@ class Auth extends \fast\Auth
|
|||
*/
|
||||
public function getChildrenAdminIds($withself = false)
|
||||
{
|
||||
$groupIds = $this->getChildrenGroupIds(false);
|
||||
$childrenAdminIds = [];
|
||||
$authGroupList = model('AuthGroupAccess')
|
||||
->field('uid,group_id')
|
||||
->where('group_id', 'in', $groupIds)
|
||||
->select();
|
||||
|
||||
foreach ($authGroupList as $k => $v)
|
||||
if (!$this->isSuperAdmin())
|
||||
{
|
||||
$childrenAdminIds[] = $v['uid'];
|
||||
$groupIds = $this->getChildrenGroupIds(false);
|
||||
$authGroupList = model('AuthGroupAccess')
|
||||
->field('uid,group_id')
|
||||
->where('group_id', 'in', $groupIds)
|
||||
->select();
|
||||
|
||||
foreach ($authGroupList as $k => $v)
|
||||
{
|
||||
$childrenAdminIds[] = $v['uid'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//超级管理员拥有所有人的权限
|
||||
$childrenAdminIds = Admin::column('id');
|
||||
}
|
||||
if ($withself)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue