joining bug

This commit is contained in:
Yaman Qalieh 2016-10-22 16:29:21 -04:00
parent 0090f64d8e
commit c002372967

View File

@ -504,8 +504,8 @@ Meteor.methods({
if (_.contains(superadmins, currentuser.services.google.email)) { if (_.contains(superadmins, currentuser.services.google.email)) {
Roles.addUsersToRoles(userId, 'superadmin'); Roles.addUsersToRoles(userId, 'superadmin');
Roles.addUsersToRoles(userId, 'admin'); Roles.addUsersToRoles(userId, 'admin');
} }
Meteor.users.update({ Meteor.users.update({
_id: userId _id: userId
}, { }, {
@ -523,7 +523,7 @@ Meteor.methods({
}); });
if (Meteor.user() !== null && if (Meteor.user() !== null &&
found !== null && found !== null &&
pass === found.code && (pass === found.code || found.privacy === false) &&
(found.status || found.admin === Meteor.userId()) && (found.status || found.admin === Meteor.userId()) &&
!_.contains(prof.classes, change)) { !_.contains(prof.classes, change)) {
var foundsubs = found.subscribers; var foundsubs = found.subscribers;