有没有办法限制 Meteor aldeed 表格包中的发布字段

Is there a way to limit published fields in Meteor aldeed tabular package

有没有办法限制发布到 aldeed 表格数据表的数据?例如,如果我的集合有属性A、B、C、D,属性C 非常敏感,因此我想阻止它被发布,所以只有属性A、B、D 被发布到数据表中。我检查了文档,但找不到明确的答案...

谢谢!!

您应该删除 autopublish package

你应该 limit field to return from a query, in this case on the publish 发挥作用。

Meteor.publish('dataTable',function(){
  return Data.find({}, { fields: { A: true, B: true, C: false, D: true } });
}

只需 Subscribe 发布

Meteor.subscribe('dataTable')

注意:如果您在 /lib 文件夹中有集合,请务必使 Subscribe

反应
Tracker.autorun(function(){
 Meteor.subscribe('dataTable')
})