fix bugs of securtiy

This commit is contained in:
yamanq 2015-02-01 23:24:28 -05:00
parent 430d300cfe
commit 33c191f8e7
2 changed files with 12 additions and 4 deletions

View File

@ -3,9 +3,13 @@ carts.allow({
insert: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
update: userId,
update: function (userId, doc) {
return (userId != null);
},
remove: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
fetch: userId
fetch: function (userId, doc) {
return (userId != null);
}
});

View File

@ -3,9 +3,13 @@ Chromebooks.allow({
insert: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
update: userId,
update: function (userId, doc) {
return (userId != null);
},
remove: function (userId, doc) {
return Roles.userIsInRole(userId, ['admin']);
},
fetch: userId
fetch: function (userId, doc) {
return (userId != null);
}
});