mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
first_boot needs to move up a folder to reach router. Prepend server_dir to redirects in router, auth, and auth_page.
This commit is contained in:
parent
4d97c29980
commit
38d3e84961
@ -124,7 +124,7 @@ TODO: explain all this cert stuff to the user.</p>
|
||||
with sqlite_db(cfg.store_file, table="firstboot", autocommit=True) as db:
|
||||
db['state']=5
|
||||
main = main + """
|
||||
<p>Welcome screen not completely implemented yet. Press <a href="router">continue</a> to
|
||||
<p>Welcome screen not completely implemented yet. Press <a href="../router">continue</a> to
|
||||
see the rest of the web interface.</p>"
|
||||
"""
|
||||
|
||||
|
||||
@ -59,10 +59,10 @@ def check_auth(*args, **kwargs):
|
||||
# A condition is just a callable that returns true or false
|
||||
if not condition():
|
||||
# Send old page as from_page parameter
|
||||
raise cherrypy.HTTPRedirect("/auth/login?from_page=%s" % get_params)
|
||||
raise cherrypy.HTTPRedirect(cfg.server_dir + "/auth/login?from_page=%s" % get_params)
|
||||
else:
|
||||
# Send old page as from_page parameter
|
||||
raise cherrypy.HTTPRedirect("/auth/login?from_page=%s" % get_params)
|
||||
raise cherrypy.HTTPRedirect(cfg.server_dir + "/auth/login?from_page=%s" % get_params)
|
||||
|
||||
cherrypy.tools.auth = cherrypy.Tool('before_handler', check_auth)
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ class AuthController(PagePlugin):
|
||||
"""Called on logout"""
|
||||
|
||||
def get_loginform(self, username, msg='', from_page="/"):
|
||||
form = Form(title="Login", action="/auth/login", message=msg)
|
||||
form = Form(title="Login", action=cfg.server_dir + "/auth/login", message=msg)
|
||||
form.text_input(name="from_page", value=from_page, type="hidden")
|
||||
form.text_input("Username", name="username", value=username)
|
||||
form.text_input("Passphrase", name="passphrase", type="password")
|
||||
|
||||
@ -23,7 +23,7 @@ class router(PagePlugin):
|
||||
reflect that we've moved down into the submenu hierarchy.
|
||||
Otherwise, it's hard to know which menu portion to make active
|
||||
or expand or contract."""
|
||||
raise cherrypy.HTTPRedirect('/router/setup')
|
||||
raise cherrypy.HTTPRedirect(cfg.server_dir + '/router/setup')
|
||||
|
||||
@cherrypy.expose
|
||||
@require()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user