mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
fix:修复后台基类 del 方法的数据权限失效的问题
This commit is contained in:
parent
10404ec0af
commit
5ee0ba3a5e
@ -167,14 +167,17 @@ trait Backend
|
||||
$this->error(__('Parameter error'));
|
||||
}
|
||||
|
||||
$where = [];
|
||||
$dataLimitAdminIds = $this->getDataLimitAdminIds();
|
||||
if ($dataLimitAdminIds) {
|
||||
$this->model->where($this->dataLimitField, 'in', $dataLimitAdminIds);
|
||||
$where[] = [$this->dataLimitField, 'in', $dataLimitAdminIds];
|
||||
}
|
||||
|
||||
$pk = $this->model->getPk();
|
||||
$data = $this->model->where($pk, 'in', $ids)->select();
|
||||
$where[] = [$pk, 'in', $ids];
|
||||
|
||||
$count = 0;
|
||||
$data = $this->model->where($where)->select();
|
||||
$this->model->startTrans();
|
||||
try {
|
||||
foreach ($data as $v) {
|
||||
|
Loading…
Reference in New Issue
Block a user