mirror of https://gitee.com/karson/fastadmin.git
commit
4f8d7380a5
|
|
@ -327,10 +327,7 @@ class Auth extends \fast\Auth
|
||||||
{
|
{
|
||||||
//取出当前管理员所有的分组
|
//取出当前管理员所有的分组
|
||||||
$groups = $this->getGroups();
|
$groups = $this->getGroups();
|
||||||
$groupIds = [];
|
$groupIds = array_column($groups, 'id');
|
||||||
foreach ($groups as $k => $v) {
|
|
||||||
$groupIds[] = $v['id'];
|
|
||||||
}
|
|
||||||
$originGroupIds = $groupIds;
|
$originGroupIds = $groupIds;
|
||||||
foreach ($groups as $k => $v) {
|
foreach ($groups as $k => $v) {
|
||||||
if (in_array($v['pid'], $originGroupIds)) {
|
if (in_array($v['pid'], $originGroupIds)) {
|
||||||
|
|
@ -371,12 +368,8 @@ class Auth extends \fast\Auth
|
||||||
$childrenAdminIds = [];
|
$childrenAdminIds = [];
|
||||||
if (!$this->isSuperAdmin()) {
|
if (!$this->isSuperAdmin()) {
|
||||||
$groupIds = $this->getChildrenGroupIds(false);
|
$groupIds = $this->getChildrenGroupIds(false);
|
||||||
$authGroupList = \app\admin\model\AuthGroupAccess::field('uid,group_id')
|
$childrenAdminIds = \app\admin\model\AuthGroupAccess::where('group_id', 'in', $groupIds)
|
||||||
->where('group_id', 'in', $groupIds)
|
->column('uid');
|
||||||
->select();
|
|
||||||
foreach ($authGroupList as $k => $v) {
|
|
||||||
$childrenAdminIds[] = $v['uid'];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//超级管理员拥有所有人的权限
|
//超级管理员拥有所有人的权限
|
||||||
$childrenAdminIds = Admin::column('id');
|
$childrenAdminIds = Admin::column('id');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue