diff --git a/hourglass/server/main.js b/hourglass/server/main.js index b1ab797..69d2c30 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -528,11 +528,11 @@ Meteor.methods({ var prof = Meteor.user().profile; var found = classes.findOne({ _id: change, - status: true }); if (Meteor.user() !== null && found !== null && pass === found.code && + (found.status || found.admin === Meteor.userId()) && !_.contains(prof.classes, change)) { var foundsubs = found.subscribers; classes.update({