allowed chromebooks to be added only by admin

This commit is contained in:
yamanq 2015-02-01 23:09:03 -05:00
parent 51e2635846
commit 38ac35ae0c

View File

@ -1 +1,9 @@
Chromebooks = new Mongo.Collection("chromebook");
Chromebooks = new Mongo.Collection("chromebook");
Chromebooks.allow({
insert: function (userId, doc) {
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
},
remove: function (userId, doc) {
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
}
});