diff --git a/kallithea/lib/utils2.py b/kallithea/lib/utils2.py --- a/kallithea/lib/utils2.py +++ b/kallithea/lib/utils2.py @@ -671,14 +671,14 @@ def suuid(url=None, truncate_to=22, alph return "".join(output)[:truncate_to] -def get_current_rhodecode_user(): +def get_current_authuser(): """ Gets rhodecode user from threadlocal tmpl_context variable if it's defined, else returns None. """ from pylons import tmpl_context - if hasattr(tmpl_context, 'rhodecode_user'): - return tmpl_context.rhodecode_user + if hasattr(tmpl_context, 'authuser'): + return tmpl_context.authuser return None