edit createWork to allow personal work to be created

This commit is contained in:
Yaman Qalieh 2016-09-03 21:12:17 -04:00
parent 64fa523e3d
commit 09dd53fb6f

View File

@ -311,8 +311,9 @@ Meteor.methods({
}); });
if (Meteor.user() && if (Meteor.user() &&
found && _.contains(Meteor.user().profile.classes, input.class) && ((found && _.contains(Meteor.user().profile.classes, input.class) &&
found.banned.indexOf(Meteor.userId()) === -1 && !_.contains(found.banned, Meteor.userId())) ||
(Meteor.userId() === input.class)) &&
input.dueDate instanceof Date && input.dueDate.getTime() >= ref && input.dueDate instanceof Date && input.dueDate.getTime() >= ref &&
_.contains(worktype, input.type) && _.contains(worktype, input.type) &&
input.name.length <= 50 && input.description.length <= 150) { input.name.length <= 50 && input.description.length <= 150) {