X-Git-Url: https://git.distorted.org.uk/~mdw/chopwood/blobdiff_plain/d674bfdad1f723556720ba839986ec13dfd250fb..ea0eda5a7760ecd64663def89e55111e0d76ae3d:/cmd-cgi.py diff --git a/cmd-cgi.py b/cmd-cgi.py index 57de66c..63253b7 100644 --- a/cmd-cgi.py +++ b/cmd-cgi.py @@ -58,6 +58,7 @@ def operate(what, op, services, *args, **kw): @CGI.subcommand('list', ['cgi-query'], 'List available accounts') def cmd_list_cgi(): CGI.page('list.fhtml', + header = dict(pragma = 'no-cache', cache_control = 'no-cache'), title = 'Chopwood: accounts list', accts = CU.list_accounts(CU.USER), nonce = HA.NONCE) @@ -85,6 +86,13 @@ def cmd_clear_cgi(services = []): operate('clear passwords', 'clear', services) @CGI.subcommand( + 'logout', ['cgi'], + 'Log out of the web interface.') +def cmd_logout_cgi(): + CGI.redirect(CGI.action('login', why = 'LOGOUT'), + set_cookie = HA.bake_cookie('logged-out')) + +@CGI.subcommand( 'fail', ['cgi-noauth'], 'Raise an exception, to test the error reporting machinery.', opts = [SC.Opt('partial', '-p', '--partial',