diff --git a/src/controllers/groups.js b/src/controllers/groups.js index 1b14828111..a14a30fbc2 100644 --- a/src/controllers/groups.js +++ b/src/controllers/groups.js @@ -124,7 +124,7 @@ api.get = function(req, res) { var q = (gid == 'party') ? Group.findOne({type: 'party', members: {'$in': [user._id]}}) : Group.findById(gid); populateQuery(gid, q); q.exec(function(err, group){ - if ( group && (group.type == 'guild' && group.privacy == 'private') || (group.type == 'party')) { + if (group && ((group.type == 'guild' && group.privacy == 'private') || (group.type == 'party'))) { if(!_.find(group.members, {_id: user._id})) return res.json(401, {err: "You don't have access to this group"}); }