Mercurial > kallithea
changeset 5315:8b8f51f36542
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.)
author | Søren Løvborg <kwi@kwi.dk> |
---|---|
date | Sun, 26 Jul 2015 13:58:50 +0200 |
parents | 071777309be1 |
children | 49f656a0ccdd |
files | kallithea/lib/base.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/base.py Fri Jul 24 17:53:20 2015 +0200 +++ b/kallithea/lib/base.py Sun Jul 26 13:58:50 2015 +0200 @@ -388,12 +388,11 @@ 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