2014-09-17 20:20:23 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-09-17 20:10:43 +02:00
|
|
|
Invites = new Meteor.Collection("invites");
|
2014-09-17 20:20:23 +02:00
|
|
|
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; },
|
2014-09-16 15:18:27 -04:00
|
|
|
remove: function(){ return true; }
|
2014-07-31 01:11:33 +02:00
|
|
|
});
|