From 053ae056ceaa7d8d23a808628b45b1ceed5451ab Mon Sep 17 00:00:00 2001 From: yackob03 Date: Tue, 15 Oct 2013 17:49:03 -0400 Subject: [PATCH] Fix logins. --- endpoints/web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/endpoints/web.py b/endpoints/web.py index 0259fcd08..f88f8cc94 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -15,10 +15,10 @@ logger = logging.getLogger(__name__) class _LoginWrappedDBUser(UserMixin): - def __init__(self, db_username): + def __init__(self, db_username, db_user=None): self._db_username = db_username - self._db_user = None + self._db_user = db_user def db_user(self): if not self._db_user: @@ -83,7 +83,7 @@ def privacy(): def common_login(db_user): - if login_user(_LoginWrappedDBUser(db_user)): + if login_user(_LoginWrappedDBUser(db_user.username, db_user)): logger.debug('Successfully signed in as: %s' % db_user.username) new_identity = QuayDeferredPermissionUser(db_user.username, 'username') identity_changed.send(app, identity=new_identity)