Fix logins.

This commit is contained in:
yackob03 2013-10-15 17:49:03 -04:00
parent 984e14f9c5
commit 053ae056ce

View file

@ -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)