🐛Fix anonymous clan details page viewing

This commit is contained in:
Matt Lott 2015-04-03 16:55:26 -07:00
parent b7fd2a89ee
commit 57bdbb4432

View file

@ -97,8 +97,6 @@ ClanHandler = class ClanHandler extends Handler
getMembers: (req, res, clanID) ->
# TODO: add tests
return @sendForbiddenError(res) unless req.user? and not req.user.isAnonymous()
clanIDs = req.user.get('clans') ? []
Clan.findById clanID, (err, clan) =>
return @sendDatabaseError(res, err) if err
return @sendDatabaseError(res, err) unless clan