From c88d23331f403207adf0d1233e2ddad7a1f94d01 Mon Sep 17 00:00:00 2001 From: sunhao Date: Fri, 24 Oct 2025 14:35:09 +0800 Subject: [PATCH] * [story #78659] add isCanViewObject comment. --- module/zai/model.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/zai/model.php b/module/zai/model.php index 0847821e1b..3fee88b888 100644 --- a/module/zai/model.php +++ b/module/zai/model.php @@ -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];