From 8c025136d8680fd43aa578e0bdfd6b85631c4c2e Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Sun, 9 Oct 2016 12:36:40 -0400 Subject: [PATCH] fix #107 --- hourglass/server/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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({