* [story #78659] add isCanViewObject comment.

This commit is contained in:
sunhao
2025-12-02 16:27:35 +08:00
parent 4288c95b11
commit c88d23331f
+10
View File
@@ -380,6 +380,16 @@ class zaiModel extends model
return array('result' => 'success', 'target' => $target, 'id' => $target->id, 'data' => $result['data']);
}
/**
* 判断用户是否可以查看对象。
* Check if user can view object.
*
* @access public
* @param string $objectType
* @param int $objectID
* @return bool
*/
public function isCanViewObject(string $objectType, int $objectID, ?array $attrs = null): bool
{
if(isset(static::$objectViews[$objectType][$objectID])) return static::$objectViews[$objectType][$objectID];