2015-02-01 23:34:58 -05:00

13 lines
348 B
JavaScript

carts = new Mongo.Collection("carts");
carts.allow({
insert: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
update: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin', 'teacher'];
},
remove: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
fetch: []
});