def status(): try: status = toDict(PYLOAD.statusServer()) status['captcha'] = PYLOAD.isCaptchaWaiting() return status except: return HTTPError()
def pre_processor(): s = request.environ.get('beaker.session') user = parse_userdata(s) perms = parse_permissions(s) status = {} captcha = False update = False plugins = False if user["is_authenticated"]: status = PYLOAD.statusServer() info = PYLOAD.getInfoByPlugin("UpdateManager") captcha = PYLOAD.isCaptchaWaiting() # check if update check is available if info: if info["pyload"] == "True": update = info["version"] if info["plugins"] == "True": plugins = True return { "user": user, 'status': status, 'captcha': captcha, 'perms': perms, 'url': request.url, 'update': update, 'plugins': plugins }
def pre_processor(): s = request.environ.get("beaker.session") user = parse_userdata(s) perms = parse_permissions(s) status = {} captcha = False update = False plugins = False if user["is_authenticated"]: status = PYLOAD.statusServer() info = PYLOAD.getInfoByPlugin("UpdateManager") captcha = PYLOAD.isCaptchaWaiting() # check if update check is available if info: if info["pyload"] == "True": update = info["version"] if info["plugins"] == "True": plugins = True return { "user": user, "status": status, "captcha": captcha, "perms": perms, "url": request.url, "update": update, "plugins": plugins, }