【发布时间】:2016-02-05 04:09:26
【问题描述】:
我无法在表格中显示创建的角色。我正在使用 alanning:roles 和 aldeed:tabular。要创建我有的表:
TabularTables.RolesAdmin = new Tabular.Table({
name: "Roles",
collection: Meteor.roles,
pub:"rolesadmin",
allow: function (userId) {
return Roles.userIsInRole(userId, 'admin');
},
columns: [
{
data: "name",
title: "Role Name",
},
],
});
出版物看起来像这样:
Meteor.publish( 'rolesadmin', function() {
return Meteor.roles.find( {}, { fields: { "name": 1 } } );
});
运行应用程序时,表格仅显示“处理中...”,因此出现错误,无法访问/查找数据?
我在服务器终端中遇到以下异常:
Exception from sub rolesadmin id 6c6x3mDzweP8MbB9A
Error: Did not check() all arguments during publisher 'rolesadmin'
如果我签入 mongo db.roles.find(),则没有 6c6x3mDzweP8MbB9A id 的角色。这个错误指的是什么?
【问题讨论】:
标签: meteor user-roles