2015-02-01 23:19:54 -05:00
|
|
|
carts = new Mongo.Collection("carts");
|
|
|
|
|
carts.allow({
|
|
|
|
|
insert: function (userId, doc) {
|
2015-02-01 23:20:29 -05:00
|
|
|
return Roles.userIsInRole(userId, ['admin']);
|
2015-02-01 23:19:54 -05:00
|
|
|
},
|
2015-02-01 23:24:28 -05:00
|
|
|
update: function (userId, doc) {
|
2015-02-01 23:34:58 -05:00
|
|
|
return Roles.userIsInRole(userId, ['admin', 'teacher'];
|
2015-02-01 23:24:28 -05:00
|
|
|
},
|
2015-02-01 23:19:54 -05:00
|
|
|
remove: function (userId, doc) {
|
2015-02-01 23:20:29 -05:00
|
|
|
return Roles.userIsInRole(userId, ['admin']);
|
|
|
|
|
},
|
2015-02-01 23:27:08 -05:00
|
|
|
fetch: []
|
2015-02-01 23:19:54 -05:00
|
|
|
});
|