15 lines
372 B
JavaScript
15 lines
372 B
JavaScript
carts = new Mongo.Collection("carts");
|
|
carts.allow({
|
|
insert: function (userId, doc) {
|
|
return Roles.userIsInRole(userId, ['admin']);
|
|
},
|
|
update: function (userId, doc) {
|
|
return (userId != null);
|
|
},
|
|
remove: function (userId, doc) {
|
|
return Roles.userIsInRole(userId, ['admin']);
|
|
},
|
|
fetch: function (userId, doc) {
|
|
return (userId != null);
|
|
}
|
|
}); |