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