aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui
diff options
context:
space:
mode:
Diffstat (limited to 'packages/torouter-web/src/tui')
-rw-r--r--packages/torouter-web/src/tui/controllers/tor.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/torouter-web/src/tui/controllers/tor.py b/packages/torouter-web/src/tui/controllers/tor.py
index bc66623..491c6b7 100644
--- a/packages/torouter-web/src/tui/controllers/tor.py
+++ b/packages/torouter-web/src/tui/controllers/tor.py
@@ -37,10 +37,13 @@ class torrc:
return render.base(render.torconfig(output))
def POST(self):
- self.update_config(web.input())
- trc = parsing.torrc(config.torrc_file)
- trc.parse()
- output = trc.html_output()
- return render.base(render.torstatus(output,config.torrc_file))
+ if session.is_logged() > 0:
+ self.update_config(web.input())
+ trc = parsing.torrc(config.torrc_file)
+ trc.parse()
+ output = trc.html_output()
+ return render.base(render.torstatus(output,config.torrc_file))
+ else:
+ return render.base(render.login())