# HG changeset patch # User Mads Kiilerich # Date 1546096596 -3600 # Node ID 8f8ee972820ff96f94043e0b4c10d7675f4b53aa # Parent 69f70de15f26c92d277f988ae7be40ee0d2b0f4a auth: don't ignore login POSTs if already logged in This is probably only rarely a big deal, but ignoring an explicit command seems wrong. This makes it possible to easily re-authenticate - we will need this ... diff -r 69f70de15f26 -r 8f8ee972820f kallithea/controllers/login.py --- a/kallithea/controllers/login.py Sun Dec 30 20:28:06 2018 +0100 +++ b/kallithea/controllers/login.py Sat Dec 29 16:16:36 2018 +0100 @@ -76,10 +76,6 @@ else: c.came_from = url('home') - # redirect if already logged in - if request.authuser.is_authenticated: - raise HTTPFound(location=c.came_from) - if request.POST: # import Login Form validator class login_form = LoginForm()() @@ -109,6 +105,10 @@ log_in_user(user, c.form_result['remember'], is_external_auth=False) raise HTTPFound(location=c.came_from) + else: + # redirect if already logged in + if request.authuser.is_authenticated: + raise HTTPFound(location=c.came_from) return render('/login.html')