* [story #78659] refactor key parsing in zaiModel to improve object visibility checks.

This commit is contained in:
sunhao
2025-12-02 16:32:02 +08:00
parent 4e0b0c9d47
commit de2c9b8045
+3 -2
View File
@@ -571,10 +571,11 @@ class zaiModel extends model
$key = isset($knowledge[$keyName]) ? $knowledge[$keyName] : '';
if(empty($key)) continue;
[$objectType, $objectID] = explode('-', $key);
$keyParts = explode('-', $key);
if(count($keyParts) < 2) continue;
$attrs = isset($knowledge[$attrsName]) ? $knowledge[$attrsName] : null;
if(!$this->isCanViewObject($objectType, $objectID, $attrs)) continue;
if(!$this->isCanViewObject($keyParts[0], $keyParts[1], $attrs)) continue;
$filteredKnowledges[] = $knowledge;