fix: [permissionLimitation:getListOfLimitations] Fixed DatabaseException for condition with empty list of values
parent
1837c4259e
commit
1c93a71f80
|
@ -67,12 +67,15 @@ class PermissionLimitationsTable extends AppTable
|
|||
]
|
||||
])->all()->toList();
|
||||
if (isset($data['global'])) {
|
||||
$limitations[$field]['global']['current'] = $MetaFields->find('all', [
|
||||
'conditions' => [
|
||||
$conditions = [
|
||||
'scope' => 'user',
|
||||
'field' => $field,
|
||||
'parent_id NOT IN' => $disabledUserIds
|
||||
]
|
||||
];
|
||||
if (!empty($disabledUserIds)) {
|
||||
$conditions['parent_id NOT IN'] = $disabledUserIds;
|
||||
}
|
||||
$limitations[$field]['global']['current'] = $MetaFields->find('all', [
|
||||
'conditions' => $conditions,
|
||||
])->count();
|
||||
}
|
||||
if (isset($data['global'])) {
|
||||
|
|
Loading…
Reference in New Issue