Changeset - 8b8f51f36542
[Not reviewed]
default
0 1 0
Søren Løvborg - 10 years ago 2015-07-26 13:58:50
kwi@kwi.dk
auth: actually use _determine_auth_user argument

Fix silly mistake which slipped through the review. (We should not look
up the session cookie again, when it's passed as a function argument.)
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/base.py
Show inline comments
 
@@ -388,12 +388,11 @@ class BaseController(WSGIController):
 
            return AuthUser(api_key=api_key, is_external_auth=True)
 

	
 
        # Authenticate by session cookie
 
        cookie = session.get('authuser')
 
        # In ancient login sessions, 'authuser' may not be a dict.
 
        # In that case, the user will have to log in again.
 
        if isinstance(cookie, dict):
 
        if isinstance(session_authuser, dict):
 
            try:
 
                return AuthUser.from_cookie(cookie)
 
                return AuthUser.from_cookie(session_authuser)
 
            except UserCreationError as e:
 
                # container auth or other auth functions that create users on
 
                # the fly can throw UserCreationError to signal issues with
0 comments (0 inline, 0 general)