mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 23:11:15 +00:00
Merge branch 'develop' of https://github.com/HabitRPG/habitrpg into develop
This commit is contained in:
commit
3fa023452f
1 changed files with 1 additions and 1 deletions
|
|
@ -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"});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue