

@tornado.gen.coroutine
def prepare(self):
    '\n        Called before every get/post invocation for this handler. We use\n        the opportunity to store the various build permission flags.\n        '
    (yield self.find_current_session())
    if (self.twsessionstatus != 'auth'):
        raise tornado.web.HTTPError(403, 'You are not signed in.')
    res = (yield motor.Op(self.application.mongodb.players.find_one, {
        '_id': self.twsession['uid'],
    }))
    if (not res):
        raise tornado.web.HTTPError(403, 'You do not exist.')
    self.twisadmin = res.get('admin', False)
    self.twisbuild = (self.twisadmin or self.get('build', False))

dataset/ETHPy150Open erkyrath/tworld/lib/tweblib/handlers.py AccountHandler.prepare/VarMisuse@129/224 `res`->`self`