diff --git a/chromebook-checkout-meteor/collections/chromebooks.js b/chromebook-checkout-meteor/collections/chromebooks.js index 4969269..6734736 100644 --- a/chromebook-checkout-meteor/collections/chromebooks.js +++ b/chromebook-checkout-meteor/collections/chromebooks.js @@ -1 +1,9 @@ -Chromebooks = new Mongo.Collection("chromebook"); \ No newline at end of file +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']); + } +}); \ No newline at end of file