def do_account_disabled(global_config): auth = web.ctx.env.get('HTTP_AUTHORIZATION') if auth is None: raise web.seeother('/login') else: auth = re.sub('^Basic ','',auth) username,password = base64.decodestring(auth).split(':') logged_out_users[username] = True web.header('Cache-Control','no-cache') web.header('Pragma','no-cache') result = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">' result += '<html>' result += WebCommonUtils.get_html_head() result += '<body>' result += username + ' account is disabled, click <a href="/login">Here</a> once account is re-enabled' result += '</body>' result += '</head>' result += '</html>' return result