Skip to content

Instantly share code, notes, and snippets.

if (Meteor.isClient) {
Meteor.subscribe('accounts');
}
// in server/security.js
Accounts.permit(['insert', 'update', 'remove']).apply();
// in server/publications/publications.js
Accounts = new Mongo.Collection('accounts', {
transform: function (account) {
account.label = function(){
return this.name;
};
return account;
}
});
Meteor.publish("contacts", function(){
if (!this.userId) {
return [];
}
return Contacts.find();
});
accounts-base 1.2.0 A user account system
accounts-password 1.1.0 Password support for accounts
alanning:roles 1.2.13 Role-based authorization
aldeed:autoform 4.2.0* Easily create forms with automatic insert and update, and ...
aldeed:autoform-select2 1.0.5* Custom select2 input type for AutoForm
aldeed:collection2 2.3.1* Automatic validation of insert and update operations on th...
aslagle:reactive-table 0.7.2 A reactive table designed for Meteor
ctjp:autoform-intl-tel-input 0.2.0 Custom input type "intl-tel-input" for AutoForm
dburles:collection-helpers 1.0.3 Transform your collections with helpers that you define
fortawesome:fontawesome 4.2.0_2* Font Awesome (official): 470+ scalable vector icons, cus...
Template.myTemplate.helpers({
evaluate: function(){
if (this and that) {
return true;
} else {
return false;
}
}
});
array(2) {
[10]=>
object(Profile)#7 (4) {
["id":protected]=>
int(10)
["data":protected]=>
&array(5) {
["ID"]=>
string(2) "10"
["PROFILE"]=>
#0 ProfilePermissions::getProfileIds(Array ([10] => Profile Object ([] => 10,[] => Array ([ID] => 10,[PROFILE] => admin,[TITLE] => School Administrator,[TYPE] => ,[SUPER_PROFILE] => ),[] => Array ([ID] => 10,[PROFILE] => admin,[TITLE] => School Administrator,[TYPE] => ,[SUPER_PROFILE] => ),[] => 1),[3] => Profile Object ([] => 3,[] => Array ([ID] => 3,[PROFILE] => admin,[TITLE] => Guidance Counselor,[TYPE] => ,[SUPER_PROFILE] => ),[] => Array ([ID] => 3,[PROFILE] => admin,[TITLE] => Guidance Counselor,[TYPE] => ,[SUPER_PROFILE] => ),[] => 1))) called at [/home/sdirc/public_html/dev/classes/ProfilePermissions.php:166] #1 ProfilePermissions::getAll(Array ([10] => Profile Object ([] => 10,[] => Array ([ID] => 10,[PROFILE] => admin,[TITLE] => School Administrator,[TYPE] => ,[SUPER_PROFILE] => ),[] => Array ([ID] => 10,[PROFILE] => admin,[TITLE] => School Administrator,[TYPE] => ,[SUPER_PROFILE] => ),[] => 1),[3] => Profile Object ([] => 3,[] => Array ([ID] => 3,[PROFILE] => admin,[TITLE] => Guidance Counselor,[TY
array(2) {
[10]=>
object(Profile)#7 (4) {
["id":protected]=>
int(10)
["data":protected]=>
&array(5) {
["ID"]=>
string(2) "10"
["PROFILE"]=>
this.route('quotes.edit', {
path: '/quote/edit/:quoteId',
waitOn: function() {
return [
Meteor.subscribe('products'),
Meteor.subscribe('accounts')
]
},
data: function() {
return {
Template.QuoteSelect.events({
"click .reactive-table tr" : function(event) {
if (event.target.parentNode.className == 'name') {
console.log(this);
}
event.preventDefault();
}
});