Vulcan/packages/telescope-invites/lib/invites.js

34 lines
613 B
JavaScript
Raw Normal View History

InviteSchema = new SimpleSchema({
2014-07-31 01:11:33 +02:00
_id: {
type: String,
optional: true
},
invitingUserId: {
type: String,
optional: true
},
invitedUserEmail: {
type: String,
regEx: SimpleSchema.RegEx.Email
},
accepted: {
type: Boolean,
optional: true
}
});
Invites = new Meteor.Collection("invites");
Invites.attachSchema(InviteSchema);
2014-07-31 01:11:33 +02:00
// invites are managed through Meteor method
Invites.deny({
insert: function(){ return true; },
update: function(){ return true; },
remove: function(){ return true; }
});
userProfileEdit.push({
template: 'userInvites',
order: 2
2014-07-31 01:11:33 +02:00
});