allowed chromebooks to be added only by admin
This commit is contained in:
parent
51e2635846
commit
38ac35ae0c
@ -1 +1,9 @@
|
||||
Chromebooks = new Mongo.Collection("chromebook");
|
||||
Chromebooks = new Mongo.Collection("chromebook");
|
||||
Chromebooks.allow({
|
||||
insert: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
},
|
||||
remove: function (userId, doc) {
|
||||
return Roles.userIsInRole(Meteor.user()._id, ['admin']);
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user