Changeset - 8f8ee972820f
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2018-12-29 16:16:36
mads@kiilerich.com
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 ...
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/login.py
Show inline comments
 
@@ -76,10 +76,6 @@ class LoginController(BaseController):
 
        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 @@ class LoginController(BaseController):
 
                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')
 

	
0 comments (0 inline, 0 general)