isInvited mechanic for #2758

This commit is contained in:
Julian Lam
2015-02-23 16:31:18 -05:00
parent 13fa1f6b9a
commit 03e39f7b9b
3 changed files with 48 additions and 9 deletions

View File

@@ -42,7 +42,12 @@ groupsController.details = function(req, res, next) {
next(null, true);
} else {
// If not, only members are granted access
groups.isMember(uid, res.locals.groupName, next);
async.parallel([
async.apply(groups.isMember, uid, res.locals.groupName),
async.apply(groups.isInvited, uid, res.locals.groupName)
], function(err, checks) {
next(err, checks[0] || checks[1]);
});
}
}
], function(err, ok) {