From 08bc8917363b4a020d0d6b9a7efbb83304332950 Mon Sep 17 00:00:00 2001 From: baozhoutao Date: Sat, 15 Jan 2022 11:38:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E8=A1=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8C=89=E9=92=AE=20#2697?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- creator/packages/steedos-creator/core.coffee | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/creator/packages/steedos-creator/core.coffee b/creator/packages/steedos-creator/core.coffee index f26cbfa599..9810ae75b4 100644 --- a/creator/packages/steedos-creator/core.coffee +++ b/creator/packages/steedos-creator/core.coffee @@ -558,6 +558,22 @@ Creator.getRelatedObjectNames = (object_name, spaceId, userId)-> related_objects = Creator.getRelatedObjects(object_name, spaceId, userId) return _.pluck(related_objects,"object_name") +Creator.getRelatedObjectListActions = (relatedObjectName, spaceId, userId)-> + actions = Creator.getActions(relatedObjectName, spaceId, userId) + actions = _.filter actions, (action)-> + if action.name == "standard_follow" + return false + if action.name == "standard_query" + return false + if action.on == "list" + if typeof action.visible == "function" + return action.visible() + else + return action.visible + else + return false + return actions + Creator.getActions = (object_name, spaceId, userId)-> if Meteor.isClient if !object_name