added security and fixed bugs in previous push
This commit is contained in:
parent
da253a8ea8
commit
430d300cfe
@ -1,9 +1,11 @@
|
||||
carts = new Mongo.Collection("carts");
|
||||
carts.allow({
|
||||
insert: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
update: userId,
|
||||
remove: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
}
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
fetch: userId
|
||||
});
|
||||
@ -1,9 +1,11 @@
|
||||
Chromebooks = new Mongo.Collection("chromebook");
|
||||
Chromebooks.allow({
|
||||
insert: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
update: userId,
|
||||
remove: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
}
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
fetch: userId
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user