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)