1
我正在尋找具有用戶權限管理和查看應用程序內容訪問權限的解決方案。用戶在流星中的新網站應用程序的訪問管理
我的目標是:
- 觀點不同的網頁登錄不同的用戶組
- 我需要通過管理員帳戶來管理這個羣體
- 那麼Web應用程序會檢查用戶的權利,並準備專門的頁面每個組
我花了一些時間,但無法找到該解決方案的好模塊。並決定創建我自己的管理面板,以及包含用戶權限的集合。
在這一刻我有一個快速的形式的問題,它並沒有告訴我一個值的一半:
Meteor.publish('allUsers',function(){
return Meteor.users.find({})
});
Meteor.publish('userAcCardS',function(){
return RoleCard.find({userId: this.userId});
});
<template name="singleUser">
<h1 class="page-title"> user - {{_id}} <i class="fa fa-pencil"></i></h1>
<h3>
-{{RCList._id}}-{{RCList.name}}-{{RCList.isAdmin}}-
{{#if RCList}}
{{> quickForm id="update_card" collection="RoleCard" doc=this type="update"}}
{{else}}
noth {{> quickForm id="new_card" collection="RoleCard" type="insert"}}
{{/if}}
</h3>
</template>
Template.singleUser.onCreated(function() {
var self = this;
self.autorun(function() {
self.subscribe('userAcCardS');
});
});
Template.singleUser.helpers({
userEmail: function(){
return this.emails\[0\].address;
},
RCList: function(){
return RoleCard.findOne({userId: this._id});
}
});
但我只看到這一點:
那麼,什麼是錯的?如果你知道它,也許你可以給我建議,以使用另一種解決方案,如流星包?
或者,也許你可以告訴我如何渲染基於「RCList」的autoform,可以提供角色卡集合的更改,如果可能的話?我是流星和js中的嶄新...