Exemplo n.º 1
0
def docs(filename):
    if filename != "privacy.html" and filename != "support.html" and filename != "about.html" and filename != "consent.html" and filename != "approval_letter.pdf":
        logging.error("Request for unknown filename " % filename)
        logging.error("Request for unknown filename " % filename)
        return HTTPError(404, "Don't try to hack me, you evil spammer")
    else:
        return static_file(filename, "%s/%s" % (static_path, "docs"))
Exemplo n.º 2
0
def getUUID(request, inHeader=False):
    try:
        retUUID = enaa.getUUID(request, auth_method, inHeader)
        logging.debug("retUUID = %s" % retUUID)
        if retUUID is None:
           raise HTTPError(403, "token is valid, but no account found for user")
        return retUUID
    except ValueError as e:
        traceback.print_exc()
        abort(401, e.message)
Exemplo n.º 3
0
def docs(filename):
    if filename != "privacy" and filename != "support" and filename != "about" and filename != "consent":
        return HTTPError(404, "Don't try to hack me, you evil spammer")
    else:
        return static_file("%s.html" % filename,
                           "%s/%s" % (static_path, "docs"))