don't worry about it
This commit is contained in:
parent
8636d149c5
commit
df9796994e
@ -4,7 +4,7 @@ carts.allow({
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
update: function (userId, doc) {
|
||||
return (userId != null);
|
||||
return Roles.userIsInRole(userId, ['admin', 'teacher'];
|
||||
},
|
||||
remove: function (userId, doc) {
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
|
||||
@ -4,7 +4,13 @@ Chromebooks.allow({
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
},
|
||||
update: function (userId, doc) {
|
||||
return (userId != null);
|
||||
if ((Chromebooks.findOne({userid: Meteor.userId()}) === undefined)
|
||||
|| (Roles.userIsInRole(Meteor.userId(), ['admin', 'teacher']))) {
|
||||
Chromebooks.update(this._id, {$set: {status: 1}});
|
||||
Chromebooks.update(this._id, {$set: {last_checkout: new Date()}});
|
||||
Chromebooks.update(this._id, {$set: {userid: Meteor.userId()}});
|
||||
Chromebooks.update(this._id, {$set: {user: Meteor.user().profile.name}});
|
||||
}
|
||||
},
|
||||
remove: function (userId, doc) {
|
||||
return Roles.userIsInRole(userId, ['admin']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user