优化管理员日志管理只显示当前组以及以下的数据
This commit is contained in:
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace app\admin\controller\auth;
|
||||
|
||||
use Throwable;
|
||||
use app\common\controller\Backend;
|
||||
use app\admin\model\AdminLog as AdminLogModel;
|
||||
use support\Response;
|
||||
@@ -36,7 +35,10 @@ class AdminLog extends Backend
|
||||
|
||||
list($where, $alias, $limit, $order) = $this->queryBuilder();
|
||||
if (!$this->auth->isSuperAdmin()) {
|
||||
$where[] = ['admin_id', '=', $this->auth->id];
|
||||
$scopeIds = $this->auth->getSelfAndSubordinateAdminIds();
|
||||
if ($scopeIds !== []) {
|
||||
$where[] = ['admin_id', 'in', $scopeIds];
|
||||
}
|
||||
}
|
||||
$res = $this->model
|
||||
->withJoin($this->withJoinTable, $this->withJoinType)
|
||||
|
||||
Reference in New Issue
Block a user